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

Side by Side Diff: chrome/browser/extensions/extension_debugger_api.cc

Issue 9473001: Extract minimal RenderViewHost interface for embedders, leaving (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to LKGR. Created 8 years, 9 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) 2011 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 // Implements the Chrome Extensions Debugger API. 5 // Implements the Chrome Extensions Debugger API.
6 6
7 #include "chrome/browser/extensions/extension_debugger_api.h" 7 #include "chrome/browser/extensions/extension_debugger_api.h"
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
11 11
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 142
143 ExtensionDevToolsClientHost* Lookup(WebContents* contents) { 143 ExtensionDevToolsClientHost* Lookup(WebContents* contents) {
144 for (std::set<DevToolsClientHost*>::iterator it = client_hosts_.begin(); 144 for (std::set<DevToolsClientHost*>::iterator it = client_hosts_.begin();
145 it != client_hosts_.end(); ++it) { 145 it != client_hosts_.end(); ++it) {
146 DevToolsAgentHost* agent_host = 146 DevToolsAgentHost* agent_host =
147 DevToolsManager::GetInstance()->GetDevToolsAgentHostFor(*it); 147 DevToolsManager::GetInstance()->GetDevToolsAgentHostFor(*it);
148 if (!agent_host) 148 if (!agent_host)
149 continue; 149 continue;
150 RenderViewHost* rvh = 150 RenderViewHost* rvh =
151 DevToolsAgentHostRegistry::GetRenderViewHost(agent_host); 151 DevToolsAgentHostRegistry::GetRenderViewHost(agent_host);
152 if (rvh && rvh->delegate() && 152 if (rvh && rvh->GetDelegate() &&
153 rvh->delegate()->GetAsWebContents() == contents) 153 rvh->GetDelegate()->GetAsWebContents() == contents)
154 return static_cast<ExtensionDevToolsClientHost*>(*it); 154 return static_cast<ExtensionDevToolsClientHost*>(*it);
155 } 155 }
156 return NULL; 156 return NULL;
157 } 157 }
158 158
159 private: 159 private:
160 std::set<DevToolsClientHost*> client_hosts_; 160 std::set<DevToolsClientHost*> client_hosts_;
161 }; 161 };
162 162
163 } // namespace 163 } // namespace
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 return; 486 return;
487 } 487 }
488 488
489 Value* result_body; 489 Value* result_body;
490 if (dictionary->Get("result", &result_body)) 490 if (dictionary->Get("result", &result_body))
491 result_.reset(result_body->DeepCopy()); 491 result_.reset(result_body->DeepCopy());
492 else 492 else
493 result_.reset(new DictionaryValue()); 493 result_.reset(new DictionaryValue());
494 SendResponse(true); 494 SendResponse(true);
495 } 495 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_crash_recovery_browsertest.cc ('k') | chrome/browser/extensions/extension_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698