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

Side by Side Diff: content/shell/browser/layout_test/layout_test_devtools_frontend.cc

Issue 790423002: Add the main frame routing ID to WebContentsDelegate, use it in BackgroundContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content shell Created 6 years 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
« no previous file with comments | « content/shell/android/shell_manager.cc ('k') | content/shell/browser/shell.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/layout_test/layout_test_devtools_frontend.h" 5 #include "content/shell/browser/layout_test/layout_test_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 "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
11 #include "content/shell/browser/shell.h" 11 #include "content/shell/browser/shell.h"
12 #include "content/shell/browser/webkit_test_controller.h" 12 #include "content/shell/browser/webkit_test_controller.h"
13 #include "net/base/filename_util.h" 13 #include "net/base/filename_util.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 // static 17 // static
18 LayoutTestDevToolsFrontend* LayoutTestDevToolsFrontend::Show( 18 LayoutTestDevToolsFrontend* LayoutTestDevToolsFrontend::Show(
19 WebContents* inspected_contents, 19 WebContents* inspected_contents,
20 const std::string& settings, 20 const std::string& settings,
21 const std::string& frontend_url) { 21 const std::string& frontend_url) {
22 scoped_refptr<DevToolsAgentHost> agent( 22 scoped_refptr<DevToolsAgentHost> agent(
23 DevToolsAgentHost::GetOrCreateFor(inspected_contents)); 23 DevToolsAgentHost::GetOrCreateFor(inspected_contents));
24 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(), 24 Shell* shell = Shell::CreateNewWindow(inspected_contents->GetBrowserContext(),
25 GURL(), 25 GURL(),
26 NULL, 26 NULL,
27 MSG_ROUTING_NONE,
28 gfx::Size()); 27 gfx::Size());
29 LayoutTestDevToolsFrontend* devtools_frontend = 28 LayoutTestDevToolsFrontend* devtools_frontend =
30 new LayoutTestDevToolsFrontend(shell, agent.get()); 29 new LayoutTestDevToolsFrontend(shell, agent.get());
31 30
32 shell->LoadURL(GetDevToolsPathAsURL(settings, frontend_url)); 31 shell->LoadURL(GetDevToolsPathAsURL(settings, frontend_url));
33 32
34 return devtools_frontend; 33 return devtools_frontend;
35 } 34 }
36 35
37 LayoutTestDevToolsFrontend::LayoutTestDevToolsFrontend( 36 LayoutTestDevToolsFrontend::LayoutTestDevToolsFrontend(
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 settings.c_str())); 69 settings.c_str()));
71 return result; 70 return result;
72 } 71 }
73 72
74 void LayoutTestDevToolsFrontend::RenderProcessGone( 73 void LayoutTestDevToolsFrontend::RenderProcessGone(
75 base::TerminationStatus status) { 74 base::TerminationStatus status) {
76 WebKitTestController::Get()->DevToolsProcessCrashed(); 75 WebKitTestController::Get()->DevToolsProcessCrashed();
77 } 76 }
78 77
79 } // namespace content 78 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/android/shell_manager.cc ('k') | content/shell/browser/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698