Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: content/renderer/devtools/devtools_client.cc

Issue 106223002: chrome power profiler chrome side changes (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/devtools/devtools_client.h" 5 #include "content/renderer/devtools/devtools_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
9 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
10 #include "content/common/devtools_messages.h" 11 #include "content/common/devtools_messages.h"
11 #include "content/public/common/content_switches.h" 12 #include "content/public/common/content_switches.h"
12 #include "content/public/common/url_constants.h" 13 #include "content/public/common/url_constants.h"
13 #include "content/renderer/render_thread_impl.h" 14 #include "content/renderer/render_thread_impl.h"
14 #include "content/renderer/render_view_impl.h" 15 #include "content/renderer/render_view_impl.h"
15 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 16 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
16 #include "third_party/WebKit/public/platform/WebString.h" 17 #include "third_party/WebKit/public/platform/WebString.h"
17 #include "third_party/WebKit/public/web/WebDevToolsFrontend.h" 18 #include "third_party/WebKit/public/web/WebDevToolsFrontend.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 56
56 void DevToolsClient::sendMessageToEmbedder(const WebString& message) { 57 void DevToolsClient::sendMessageToEmbedder(const WebString& message) {
57 Send(new DevToolsHostMsg_DispatchOnEmbedder(routing_id(), 58 Send(new DevToolsHostMsg_DispatchOnEmbedder(routing_id(),
58 message.utf8())); 59 message.utf8()));
59 } 60 }
60 61
61 bool DevToolsClient::isUnderTest() { 62 bool DevToolsClient::isUnderTest() {
62 return RenderThreadImpl::current()->layout_test_mode(); 63 return RenderThreadImpl::current()->layout_test_mode();
63 } 64 }
64 65
66 void DevToolsClient::checkPowerProfileSupportedStatus() {
67 Send(new DevToolsHostMsg_PowerProfileSupported(routing_id()));
68 }
69
70 void DevToolsClient::startPowerProfile() {
71 Send(new DevToolsHostMsg_StartPowerProfile(routing_id()));
72 }
73
74 void DevToolsClient::stopPowerProfile() {
75 Send(new DevToolsHostMsg_StopPowerProfile(routing_id()));
76 }
77
78 void DevToolsClient::setPowerProfileResolution(unsigned resolution) {
79 Send(new DevToolsHostMsg_SetPowerProfileResolution(routing_id(), resolution));
80 }
81
65 void DevToolsClient::OnDispatchOnInspectorFrontend(const std::string& message) { 82 void DevToolsClient::OnDispatchOnInspectorFrontend(const std::string& message) {
66 web_tools_frontend_->dispatchOnInspectorFrontend( 83 web_tools_frontend_->dispatchOnInspectorFrontend(
67 WebString::fromUTF8(message)); 84 WebString::fromUTF8(message));
68 } 85 }
69 86
70 } // namespace content 87 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698