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/browser/devtools/devtools_agent_host_impl.h" | 5 #include "content/browser/devtools/devtools_agent_host_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "content/common/devtools_messages.h" | 8 #include "content/common/devtools_messages.h" |
9 #include "content/public/browser/devtools_manager.h" | |
9 | 10 |
10 namespace content { | 11 namespace content { |
11 | 12 |
12 namespace { | 13 namespace { |
13 static int g_next_agent_host_id = 0; | 14 static int g_next_agent_host_id = 0; |
14 } // namespace | 15 } // namespace |
15 | 16 |
16 DevToolsAgentHostImpl::DevToolsAgentHostImpl() | 17 DevToolsAgentHostImpl::DevToolsAgentHostImpl() |
17 : close_listener_(NULL), | 18 : close_listener_(NULL), |
18 id_(++g_next_agent_host_id) { | 19 id_(++g_next_agent_host_id) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 SendMessageToAgent(new DevToolsAgentMsg_AddMessageToConsole( | 52 SendMessageToAgent(new DevToolsAgentMsg_AddMessageToConsole( |
52 MSG_ROUTING_NONE, | 53 MSG_ROUTING_NONE, |
53 level, | 54 level, |
54 message)); | 55 message)); |
55 } | 56 } |
56 | 57 |
57 RenderViewHost* DevToolsAgentHostImpl::GetRenderViewHost() { | 58 RenderViewHost* DevToolsAgentHostImpl::GetRenderViewHost() { |
58 return NULL; | 59 return NULL; |
59 } | 60 } |
60 | 61 |
62 bool DevToolsAgentHostImpl::attached() { | |
63 return !!DevToolsManager::GetInstance()->GetDevToolsClientHostFor(this); | |
pfeldman
2013/03/01 14:28:17
So this is a convenience method that only depends
Vladislav Kaznacheev
2013/03/01 16:16:38
Done.
| |
64 } | |
65 | |
66 std::string DevToolsAgentHostImpl::title() { | |
67 return ""; | |
68 } | |
69 | |
70 GURL DevToolsAgentHostImpl::url() { | |
71 return GURL(); | |
72 } | |
73 | |
74 GURL DevToolsAgentHostImpl::thumbnail_url() { | |
75 return GURL(); | |
76 } | |
77 | |
78 GURL DevToolsAgentHostImpl::favicon_url() { | |
79 return GURL(); | |
80 } | |
81 | |
61 void DevToolsAgentHostImpl::NotifyCloseListener() { | 82 void DevToolsAgentHostImpl::NotifyCloseListener() { |
62 if (close_listener_) { | 83 if (close_listener_) { |
63 scoped_refptr<DevToolsAgentHostImpl> protect(this); | 84 scoped_refptr<DevToolsAgentHostImpl> protect(this); |
64 close_listener_->AgentHostClosing(this); | 85 close_listener_->AgentHostClosing(this); |
65 close_listener_ = NULL; | 86 close_listener_ = NULL; |
66 } | 87 } |
67 } | 88 } |
68 | 89 |
69 } // namespace content | 90 } // namespace content |
OLD | NEW |