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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 251653003: Introduces DevToolsManagerDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add InspectWorker() to WebContents, WebContentsImpl, WebContentsDelegate and Browser. Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 const blink::WebGestureEvent& event) { 1209 const blink::WebGestureEvent& event) {
1210 // Disable pinch zooming in undocked dev tools window due to poor UX. 1210 // Disable pinch zooming in undocked dev tools window due to poor UX.
1211 if (app_name() == DevToolsWindow::kDevToolsApp) 1211 if (app_name() == DevToolsWindow::kDevToolsApp)
1212 return event.type == blink::WebGestureEvent::GesturePinchBegin || 1212 return event.type == blink::WebGestureEvent::GesturePinchBegin ||
1213 event.type == blink::WebGestureEvent::GesturePinchUpdate || 1213 event.type == blink::WebGestureEvent::GesturePinchUpdate ||
1214 event.type == blink::WebGestureEvent::GesturePinchEnd; 1214 event.type == blink::WebGestureEvent::GesturePinchEnd;
1215 1215
1216 return false; 1216 return false;
1217 } 1217 }
1218 1218
1219 void Browser::InspectWorker(content::DevToolsAgentHost* agent_host) {
1220 DevToolsWindow::OpenDevToolsWindowForWorker(profile_, agent_host);
1221 }
1222
1219 bool Browser::IsMouseLocked() const { 1223 bool Browser::IsMouseLocked() const {
1220 return fullscreen_controller_->IsMouseLocked(); 1224 return fullscreen_controller_->IsMouseLocked();
1221 } 1225 }
1222 1226
1223 void Browser::OnWindowDidShow() { 1227 void Browser::OnWindowDidShow() {
1224 if (window_has_shown_) 1228 if (window_has_shown_)
1225 return; 1229 return;
1226 window_has_shown_ = true; 1230 window_has_shown_ = true;
1227 1231
1228 // CurrentProcessInfo::CreationTime() is missing on some platforms. 1232 // CurrentProcessInfo::CreationTime() is missing on some platforms.
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2417 if (contents && !allow_js_access) { 2421 if (contents && !allow_js_access) {
2418 contents->web_contents()->GetController().LoadURL( 2422 contents->web_contents()->GetController().LoadURL(
2419 target_url, 2423 target_url,
2420 content::Referrer(), 2424 content::Referrer(),
2421 content::PAGE_TRANSITION_LINK, 2425 content::PAGE_TRANSITION_LINK,
2422 std::string()); // No extra headers. 2426 std::string()); // No extra headers.
2423 } 2427 }
2424 2428
2425 return contents != NULL; 2429 return contents != NULL;
2426 } 2430 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698