chromium/chrome/browser/devtools/device/android_device_info_query.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include <stddef.h>

#include <string_view>

#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "chrome/browser/devtools/device/android_device_manager.h"

namespace {

#define SEPARATOR

const char kAllCommands[] =;

const char kSeparator[] =;

#undef SEPARATOR

const char kScreenSizePrefix[] =;
const char kUserInfoPrefix[] =;

const char kDevToolsSocketSuffix[] =;

const char kChromeDefaultName[] =;
const char kChromeDefaultSocket[] =;

const char kWebViewSocketPrefix[] =;
const char kWebViewNameTemplate[] =;

struct BrowserDescriptor {};

const BrowserDescriptor kBrowserDescriptors[] =;

const BrowserDescriptor* FindBrowserDescriptor(const std::string& package) {}

bool BrowserCompare(const AndroidDeviceManager::BrowserInfo& a,
                    const AndroidDeviceManager::BrowserInfo& b) {}

StringMap;

void MapProcessesToPackages(const std::string& response,
                            StringMap* pid_to_package,
                            StringMap* pid_to_user) {}

StringMap MapSocketsToProcesses(const std::string& response) {}

gfx::Size ParseScreenSize(std::string_view str) {}

gfx::Size ParseWindowPolicyResponse(const std::string& response) {}

StringMap MapIdsToUsers(const std::string& response) {}

std::string GetUserName(const std::string& unix_user,
                        const StringMap id_to_username) {}

AndroidDeviceManager::BrowserInfo::Type
GetBrowserType(const std::string& socket) {}

void ReceivedResponse(AndroidDeviceManager::DeviceInfoCallback callback,
                      int result,
                      const std::string& response) {}

}  // namespace

// static
std::string AndroidDeviceManager::GetBrowserName(const std::string& socket,
                                                 const std::string& package) {}

// static
void AndroidDeviceManager::QueryDeviceInfo(RunCommandCallback command_callback,
                                           DeviceInfoCallback callback) {}