| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |