|
@@ -61,11 +61,6 @@ const char kFrontendHostMethod[] = "method";
|
|
|
const char kFrontendHostParams[] = "params";
|
|
|
const char kTitleFormat[] = "Developer Tools - %s";
|
|
|
|
|
|
-const char kDevToolsActionTakenHistogram[] = "DevTools.ActionTaken";
|
|
|
-const int kDevToolsActionTakenBoundary = 100;
|
|
|
-const char kDevToolsPanelShownHistogram[] = "DevTools.PanelShown";
|
|
|
-const int kDevToolsPanelShownBoundary = 20;
|
|
|
-
|
|
|
const size_t kMaxMessageChunkSize = IPC::Channel::kMaximumMessageSize / 4;
|
|
|
|
|
|
void RectToDictionary(const gfx::Rect& bounds, base::DictionaryValue* dict) {
|
|
@@ -171,7 +166,7 @@ int ResponseWriter::Initialize(const net::CompletionCallback& callback) {
|
|
|
int ResponseWriter::Write(net::IOBuffer* buffer,
|
|
|
int num_bytes,
|
|
|
const net::CompletionCallback& callback) {
|
|
|
- auto* id = new base::FundamentalValue(stream_id_);
|
|
|
+ auto* id = new base::Value(stream_id_);
|
|
|
base::StringValue* chunk =
|
|
|
new base::StringValue(std::string(buffer->data(), num_bytes));
|
|
|
|
|
@@ -563,14 +558,6 @@ void InspectableWebContentsImpl::DispatchProtocolMessageFromDevToolsFrontend(
|
|
|
agent_host_->DispatchProtocolMessage(this, message);
|
|
|
}
|
|
|
|
|
|
-void InspectableWebContentsImpl::RecordActionUMA(const std::string& name,
|
|
|
- int action) {
|
|
|
- if (name == kDevToolsActionTakenHistogram)
|
|
|
- UMA_HISTOGRAM_ENUMERATION(name, action, kDevToolsActionTakenBoundary);
|
|
|
- else if (name == kDevToolsPanelShownHistogram)
|
|
|
- UMA_HISTOGRAM_ENUMERATION(name, action, kDevToolsPanelShownBoundary);
|
|
|
-}
|
|
|
-
|
|
|
void InspectableWebContentsImpl::SendJsonRequest(
|
|
|
const DispatchCallback& callback,
|
|
|
const std::string& browser_id,
|
|
@@ -639,7 +626,7 @@ void InspectableWebContentsImpl::DispatchProtocolMessage(
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- base::FundamentalValue total_size(static_cast<int>(message.length()));
|
|
|
+ base::Value total_size(static_cast<int>(message.length()));
|
|
|
for (size_t pos = 0; pos < message.length(); pos += kMaxMessageChunkSize) {
|
|
|
base::StringValue message_value(message.substr(pos, kMaxMessageChunkSize));
|
|
|
CallClientFunction("DevToolsAPI.dispatchMessageChunk",
|
|
@@ -686,10 +673,12 @@ bool InspectableWebContentsImpl::DidAddMessageToConsole(
|
|
|
|
|
|
bool InspectableWebContentsImpl::ShouldCreateWebContents(
|
|
|
content::WebContents* web_contents,
|
|
|
+ content::SiteInstance* source_site_instance,
|
|
|
int32_t route_id,
|
|
|
int32_t main_frame_route_id,
|
|
|
int32_t main_frame_widget_route_id,
|
|
|
content::mojom::WindowContainerType window_container_type,
|
|
|
+ const GURL& opener_url,
|
|
|
const std::string& frame_name,
|
|
|
const GURL& target_url,
|
|
|
const std::string& partition_id,
|
|
@@ -777,7 +766,7 @@ void InspectableWebContentsImpl::OnURLFetchComplete(
|
|
|
|
|
|
void InspectableWebContentsImpl::SendMessageAck(int request_id,
|
|
|
const base::Value* arg) {
|
|
|
- base::FundamentalValue id_value(request_id);
|
|
|
+ base::Value id_value(request_id);
|
|
|
CallClientFunction("DevToolsAPI.embedderMessageAck",
|
|
|
&id_value, arg, nullptr);
|
|
|
}
|