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

Side by Side Diff: content/shell/shell_devtools_frontend.cc

Issue 13409003: Hide ContentClient getters from embedders so that they they don't reuse content's embedder API. The… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 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
« no previous file with comments | « content/shell/shell_content_renderer_client.cc ('k') | content/shell/shell_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/shell/shell_devtools_frontend.h" 5 #include "content/shell/shell_devtools_frontend.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "content/public/browser/devtools_http_handler.h" 9 #include "content/public/browser/devtools_http_handler.h"
10 #include "content/public/browser/devtools_manager.h" 10 #include "content/public/browser/devtools_manager.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(), 49 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(),
50 GURL(), 50 GURL(),
51 NULL, 51 NULL,
52 MSG_ROUTING_NONE, 52 MSG_ROUTING_NONE,
53 gfx::Size()); 53 gfx::Size());
54 ShellDevToolsFrontend* devtools_frontend = new ShellDevToolsFrontend( 54 ShellDevToolsFrontend* devtools_frontend = new ShellDevToolsFrontend(
55 shell, 55 shell,
56 DevToolsAgentHost::GetOrCreateFor( 56 DevToolsAgentHost::GetOrCreateFor(
57 inspected_contents->GetRenderViewHost())); 57 inspected_contents->GetRenderViewHost()));
58 58
59 ShellContentBrowserClient* browser_client = 59 ShellDevToolsDelegate* delegate = ShellContentBrowserClient::Get()->
60 static_cast<ShellContentBrowserClient*>( 60 shell_browser_main_parts()->devtools_delegate();
61 GetContentClient()->browser());
62 ShellDevToolsDelegate* delegate =
63 browser_client->shell_browser_main_parts()->devtools_delegate();
64 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) 61 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
65 shell->LoadURL(GetDevToolsPathAsURL()); 62 shell->LoadURL(GetDevToolsPathAsURL());
66 else 63 else
67 shell->LoadURL(delegate->devtools_http_handler()->GetFrontendURL(NULL)); 64 shell->LoadURL(delegate->devtools_http_handler()->GetFrontendURL(NULL));
68 65
69 return devtools_frontend; 66 return devtools_frontend;
70 } 67 }
71 68
72 void ShellDevToolsFrontend::Focus() { 69 void ShellDevToolsFrontend::Focus() {
73 web_contents()->GetView()->Focus(); 70 web_contents()->GetView()->Focus();
(...skipping 27 matching lines...) Expand all
101 void ShellDevToolsFrontend::WebContentsDestroyed(WebContents* web_contents) { 98 void ShellDevToolsFrontend::WebContentsDestroyed(WebContents* web_contents) {
102 DevToolsManager::GetInstance()->ClientHostClosing(frontend_host_.get()); 99 DevToolsManager::GetInstance()->ClientHostClosing(frontend_host_.get());
103 delete this; 100 delete this;
104 } 101 }
105 102
106 void ShellDevToolsFrontend::InspectedContentsClosing() { 103 void ShellDevToolsFrontend::InspectedContentsClosing() {
107 frontend_shell_->Close(); 104 frontend_shell_->Close();
108 } 105 }
109 106
110 } // namespace content 107 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_content_renderer_client.cc ('k') | content/shell/shell_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698