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

Side by Side Diff: content/browser/debugger/devtools_manager_impl.h

Issue 10065017: TabContents -> WebContentsImpl, part 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months 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 | Annotate | Revision Log
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 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_
6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_ 6 #define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // there is a DevToolsClientHost registered for the |inspected_rvh|. 54 // there is a DevToolsClientHost registered for the |inspected_rvh|.
55 void OnNavigatingToPendingEntry(RenderViewHost* inspected_rvh, 55 void OnNavigatingToPendingEntry(RenderViewHost* inspected_rvh,
56 RenderViewHost* dest_rvh, 56 RenderViewHost* dest_rvh,
57 const GURL& gurl); 57 const GURL& gurl);
58 void OnCancelPendingNavigation(RenderViewHost* pending, 58 void OnCancelPendingNavigation(RenderViewHost* pending,
59 RenderViewHost* current); 59 RenderViewHost* current);
60 60
61 // DevToolsManager implementation 61 // DevToolsManager implementation
62 virtual bool DispatchOnInspectorBackend(DevToolsClientHost* from, 62 virtual bool DispatchOnInspectorBackend(DevToolsClientHost* from,
63 const std::string& message) OVERRIDE; 63 const std::string& message) OVERRIDE;
64 virtual void TabReplaced(WebContents* old_tab, WebContents* new_tab) OVERRIDE; 64 virtual void ContentsReplaced(WebContents* old_contents,
65 WebContents* new_contents) OVERRIDE;
65 virtual void CloseAllClientHosts() OVERRIDE; 66 virtual void CloseAllClientHosts() OVERRIDE;
66 virtual void AttachClientHost(int client_host_cookie, 67 virtual void AttachClientHost(int client_host_cookie,
67 DevToolsAgentHost* to_agent) OVERRIDE; 68 DevToolsAgentHost* to_agent) OVERRIDE;
68 virtual DevToolsClientHost* GetDevToolsClientHostFor( 69 virtual DevToolsClientHost* GetDevToolsClientHostFor(
69 DevToolsAgentHost* agent_host) OVERRIDE; 70 DevToolsAgentHost* agent_host) OVERRIDE;
70 virtual DevToolsAgentHost* GetDevToolsAgentHostFor( 71 virtual DevToolsAgentHost* GetDevToolsAgentHostFor(
71 DevToolsClientHost* client_host) OVERRIDE; 72 DevToolsClientHost* client_host) OVERRIDE;
72 virtual void RegisterDevToolsClientHostFor( 73 virtual void RegisterDevToolsClientHostFor(
73 DevToolsAgentHost* agent_host, 74 DevToolsAgentHost* agent_host,
74 DevToolsClientHost* client_host) OVERRIDE; 75 DevToolsClientHost* client_host) OVERRIDE;
(...skipping 19 matching lines...) Expand all
94 DevToolsClientHost* client_host); 95 DevToolsClientHost* client_host);
95 96
96 // Detaches client host and returns cookie that can be used in 97 // Detaches client host and returns cookie that can be used in
97 // AttachClientHost. 98 // AttachClientHost.
98 int DetachClientHost(RenderViewHost* from_rvh); 99 int DetachClientHost(RenderViewHost* from_rvh);
99 100
100 // Attaches orphan client host to new render view host. 101 // Attaches orphan client host to new render view host.
101 void AttachClientHost(int client_host_cookie, 102 void AttachClientHost(int client_host_cookie,
102 RenderViewHost* to_rvh); 103 RenderViewHost* to_rvh);
103 104
104 // These two maps are for tracking dependencies between inspected tabs and 105 // These two maps are for tracking dependencies between inspected contents and
105 // their DevToolsClientHosts. They are useful for routing devtools messages 106 // their DevToolsClientHosts. They are useful for routing devtools messages
106 // and allow us to have at most one devtools client host per tab. 107 // and allow us to have at most one devtools client host per contents.
107 // 108 //
108 // DevToolsManagerImpl starts listening to DevToolsClientHosts when they are 109 // DevToolsManagerImpl starts listening to DevToolsClientHosts when they are
109 // put into these maps and removes them when they are closing. 110 // put into these maps and removes them when they are closing.
110 typedef std::map<DevToolsAgentHost*, DevToolsClientHost*> 111 typedef std::map<DevToolsAgentHost*, DevToolsClientHost*>
111 AgentToClientHostMap; 112 AgentToClientHostMap;
112 AgentToClientHostMap agent_to_client_host_; 113 AgentToClientHostMap agent_to_client_host_;
113 114
114 typedef std::map<DevToolsClientHost*, DevToolsAgentHost*> 115 typedef std::map<DevToolsClientHost*, DevToolsAgentHost*>
115 ClientToAgentHostMap; 116 ClientToAgentHostMap;
116 ClientToAgentHostMap client_to_agent_host_; 117 ClientToAgentHostMap client_to_agent_host_;
117 118
118 typedef std::map<DevToolsAgentHost*, std::string> AgentRuntimeStates; 119 typedef std::map<DevToolsAgentHost*, std::string> AgentRuntimeStates;
119 AgentRuntimeStates agent_runtime_states_; 120 AgentRuntimeStates agent_runtime_states_;
120 121
121 typedef std::map<int, std::pair<DevToolsClientHost*, std::string> > 122 typedef std::map<int, std::pair<DevToolsClientHost*, std::string> >
122 OrphanClientHosts; 123 OrphanClientHosts;
123 OrphanClientHosts orphan_client_hosts_; 124 OrphanClientHosts orphan_client_hosts_;
124 int last_orphan_cookie_; 125 int last_orphan_cookie_;
125 126
126 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerImpl); 127 DISALLOW_COPY_AND_ASSIGN(DevToolsManagerImpl);
127 }; 128 };
128 129
129 } // namespace content 130 } // namespace content
130 131
131 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_ 132 #endif // CONTENT_BROWSER_DEBUGGER_DEVTOOLS_MANAGER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/debugger/devtools_http_handler_impl.cc ('k') | content/browser/debugger/devtools_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698