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

Side by Side Diff: chrome/browser/debugger/devtools_window.cc

Issue 10868116: Pass result of blockage across content API when new tab blocked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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) 2012 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 #include <algorithm> 5 #include <algorithm>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 SkColorToRGBAString(color_toolbar).c_str(), 574 SkColorToRGBAString(color_toolbar).c_str(),
575 SkColorToRGBAString(color_tab_text).c_str()); 575 SkColorToRGBAString(color_tab_text).c_str());
576 tab_contents_->web_contents()->GetRenderViewHost()-> 576 tab_contents_->web_contents()->GetRenderViewHost()->
577 ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(command)); 577 ExecuteJavascriptInWebFrame(string16(), UTF8ToUTF16(command));
578 } 578 }
579 579
580 void DevToolsWindow::AddNewContents(WebContents* source, 580 void DevToolsWindow::AddNewContents(WebContents* source,
581 WebContents* new_contents, 581 WebContents* new_contents,
582 WindowOpenDisposition disposition, 582 WindowOpenDisposition disposition,
583 const gfx::Rect& initial_pos, 583 const gfx::Rect& initial_pos,
584 bool user_gesture) { 584 bool user_gesture,
585 bool* was_blocked) {
585 if (inspected_tab_) { 586 if (inspected_tab_) {
586 inspected_tab_->web_contents()->GetDelegate()->AddNewContents( 587 inspected_tab_->web_contents()->GetDelegate()->AddNewContents(
587 source, new_contents, disposition, initial_pos, user_gesture); 588 source, new_contents, disposition, initial_pos, user_gesture,
589 was_blocked);
588 } 590 }
589 } 591 }
590 592
591 bool DevToolsWindow::PreHandleKeyboardEvent( 593 bool DevToolsWindow::PreHandleKeyboardEvent(
592 content::WebContents* source, 594 content::WebContents* source,
593 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) { 595 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) {
594 if (docked_) { 596 if (docked_) {
595 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); 597 BrowserWindow* inspected_window = GetInspectedBrowserWindow();
596 if (inspected_window) 598 if (inspected_window)
597 return inspected_window->PreHandleKeyboardEvent( 599 return inspected_window->PreHandleKeyboardEvent(
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
778 FileSelectHelper::RunFileChooser(web_contents, params); 780 FileSelectHelper::RunFileChooser(web_contents, params);
779 } 781 }
780 782
781 void DevToolsWindow::UpdateBrowserToolbar() { 783 void DevToolsWindow::UpdateBrowserToolbar() {
782 if (!inspected_tab_) 784 if (!inspected_tab_)
783 return; 785 return;
784 BrowserWindow* inspected_window = GetInspectedBrowserWindow(); 786 BrowserWindow* inspected_window = GetInspectedBrowserWindow();
785 if (inspected_window) 787 if (inspected_window)
786 inspected_window->UpdateToolbar(inspected_tab_, false); 788 inspected_window->UpdateToolbar(inspected_tab_, false);
787 } 789 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698