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

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

Issue 1079843002: DevTools: allow storing devtools preferences on the browser side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 5 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/shell/browser/shell_devtools_frontend.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"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 if (!settings.empty()) 55 if (!settings.empty())
56 result = GURL(base::StringPrintf("%s?settings=%s&experiments=true", 56 result = GURL(base::StringPrintf("%s?settings=%s&experiments=true",
57 result.spec().c_str(), 57 result.spec().c_str(),
58 settings.c_str())); 58 settings.c_str()));
59 return result; 59 return result;
60 } 60 }
61 61
62 void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings, 62 void LayoutTestDevToolsFrontend::ReuseFrontend(const std::string& settings,
63 const std::string frontend_url) { 63 const std::string frontend_url) {
64 DisconnectFromTarget(); 64 DisconnectFromTarget();
65 preferences()->Clear();
65 frontend_shell()->LoadURL(GetDevToolsPathAsURL(settings, frontend_url)); 66 frontend_shell()->LoadURL(GetDevToolsPathAsURL(settings, frontend_url));
66 } 67 }
67 68
68 LayoutTestDevToolsFrontend::LayoutTestDevToolsFrontend( 69 LayoutTestDevToolsFrontend::LayoutTestDevToolsFrontend(
69 Shell* frontend_shell, 70 Shell* frontend_shell,
70 WebContents* inspected_contents) 71 WebContents* inspected_contents)
71 : ShellDevToolsFrontend(frontend_shell, inspected_contents) { 72 : ShellDevToolsFrontend(frontend_shell, inspected_contents) {
72 } 73 }
73 74
74 LayoutTestDevToolsFrontend::~LayoutTestDevToolsFrontend() { 75 LayoutTestDevToolsFrontend::~LayoutTestDevToolsFrontend() {
75 } 76 }
76 77
77 void LayoutTestDevToolsFrontend::AgentHostClosed( 78 void LayoutTestDevToolsFrontend::AgentHostClosed(
78 DevToolsAgentHost* agent_host, bool replaced) { 79 DevToolsAgentHost* agent_host, bool replaced) {
79 // Do not close the front-end shell. 80 // Do not close the front-end shell.
80 } 81 }
81 82
82 void LayoutTestDevToolsFrontend::RenderProcessGone( 83 void LayoutTestDevToolsFrontend::RenderProcessGone(
83 base::TerminationStatus status) { 84 base::TerminationStatus status) {
84 WebKitTestController::Get()->DevToolsProcessCrashed(); 85 WebKitTestController::Get()->DevToolsProcessCrashed();
85 } 86 }
86 87
87 } // namespace content 88 } // namespace content
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | content/shell/browser/shell_devtools_frontend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698