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

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

Issue 10837112: Add WebContents* to some more WebContentsDelegate methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 4 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 "chrome/browser/ui/views/external_tab_container_win.h" 5 #include "chrome/browser/ui/views/external_tab_container_win.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 } 586 }
587 } 587 }
588 588
589 void ExternalTabContainerWin::ContentsZoomChange(bool zoom_in) { 589 void ExternalTabContainerWin::ContentsZoomChange(bool zoom_in) {
590 } 590 }
591 591
592 gfx::NativeWindow ExternalTabContainerWin::GetFrameNativeWindow() { 592 gfx::NativeWindow ExternalTabContainerWin::GetFrameNativeWindow() {
593 return hwnd(); 593 return hwnd();
594 } 594 }
595 595
596 bool ExternalTabContainerWin::TakeFocus(bool reverse) { 596 bool ExternalTabContainerWin::TakeFocus(content::WebContents* source,
597 bool reverse) {
597 if (automation_) { 598 if (automation_) {
598 automation_->Send(new AutomationMsg_TabbedOut(tab_handle_, 599 automation_->Send(new AutomationMsg_TabbedOut(tab_handle_,
599 base::win::IsShiftPressed())); 600 base::win::IsShiftPressed()));
600 } 601 }
601 602
602 return true; 603 return true;
603 } 604 }
604 605
605 bool ExternalTabContainerWin::CanDownload(RenderViewHost* render_view_host, 606 bool ExternalTabContainerWin::CanDownload(RenderViewHost* render_view_host,
606 int request_id, 607 int request_id,
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 NOTREACHED(); // Should be handled in host. 719 NOTREACHED(); // Should be handled in host.
719 break; 720 break;
720 } 721 }
721 } 722 }
722 723
723 external_context_menu_->ExecuteCommand(command); 724 external_context_menu_->ExecuteCommand(command);
724 return true; 725 return true;
725 } 726 }
726 727
727 bool ExternalTabContainerWin::PreHandleKeyboardEvent( 728 bool ExternalTabContainerWin::PreHandleKeyboardEvent(
729 content::WebContents* source,
728 const NativeWebKeyboardEvent& event, 730 const NativeWebKeyboardEvent& event,
729 bool* is_keyboard_shortcut) { 731 bool* is_keyboard_shortcut) {
730 return false; 732 return false;
731 } 733 }
732 734
733 void ExternalTabContainerWin::HandleKeyboardEvent( 735 void ExternalTabContainerWin::HandleKeyboardEvent(
736 content::WebContents* source,
734 const NativeWebKeyboardEvent& event) { 737 const NativeWebKeyboardEvent& event) {
735 ProcessUnhandledKeyStroke(event.os_event.hwnd, event.os_event.message, 738 ProcessUnhandledKeyStroke(event.os_event.hwnd, event.os_event.message,
736 event.os_event.wParam, event.os_event.lParam); 739 event.os_event.wParam, event.os_event.lParam);
737 } 740 }
738 741
739 void ExternalTabContainerWin::BeforeUnloadFired(WebContents* tab, 742 void ExternalTabContainerWin::BeforeUnloadFired(WebContents* tab,
740 bool proceed, 743 bool proceed,
741 bool* proceed_to_fire_unload) { 744 bool* proceed_to_fire_unload) {
742 *proceed_to_fire_unload = true; 745 *proceed_to_fire_unload = true;
743 746
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 if (params.disposition == CURRENT_TAB) { 1254 if (params.disposition == CURRENT_TAB) {
1252 DCHECK(route_all_top_level_navigations_); 1255 DCHECK(route_all_top_level_navigations_);
1253 forward_params.disposition = NEW_FOREGROUND_TAB; 1256 forward_params.disposition = NEW_FOREGROUND_TAB;
1254 } 1257 }
1255 WebContents* new_contents = 1258 WebContents* new_contents =
1256 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1259 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1257 // support only one navigation for a dummy tab before it is killed. 1260 // support only one navigation for a dummy tab before it is killed.
1258 ::DestroyWindow(GetNativeView()); 1261 ::DestroyWindow(GetNativeView());
1259 return new_contents; 1262 return new_contents;
1260 } 1263 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/external_tab_container_win.h ('k') | chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698