OLD | NEW |
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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "content/common/devtools_messages.h" | 10 #include "content/common/devtools_messages.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 | 33 |
34 DevToolsClient::~DevToolsClient() { | 34 DevToolsClient::~DevToolsClient() { |
35 } | 35 } |
36 | 36 |
37 void DevToolsClient::DidClearWindowObject() { | 37 void DevToolsClient::DidClearWindowObject() { |
38 if (!compatibility_script_.empty()) | 38 if (!compatibility_script_.empty()) |
39 render_frame()->ExecuteJavaScript(base::UTF8ToUTF16(compatibility_script_)); | 39 render_frame()->ExecuteJavaScript(base::UTF8ToUTF16(compatibility_script_)); |
40 } | 40 } |
41 | 41 |
| 42 void DevToolsClient::OnDestruct() { |
| 43 delete this; |
| 44 } |
| 45 |
42 void DevToolsClient::sendMessageToEmbedder(const WebString& message) { | 46 void DevToolsClient::sendMessageToEmbedder(const WebString& message) { |
43 Send(new DevToolsHostMsg_DispatchOnEmbedder(routing_id(), | 47 Send(new DevToolsHostMsg_DispatchOnEmbedder(routing_id(), |
44 message.utf8())); | 48 message.utf8())); |
45 } | 49 } |
46 | 50 |
47 bool DevToolsClient::isUnderTest() { | 51 bool DevToolsClient::isUnderTest() { |
48 return RenderThreadImpl::current()->layout_test_mode(); | 52 return RenderThreadImpl::current()->layout_test_mode(); |
49 } | 53 } |
50 | 54 |
51 } // namespace content | 55 } // namespace content |
OLD | NEW |