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

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

Issue 11416013: Move RequestPpapiBrokerPermission from WebContentsObserver to WebContentsDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/views/external_tab_container_win.h ('k') | chrome/chrome_browser.gypi » ('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 (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"
11 #include "base/debug/trace_event.h" 11 #include "base/debug/trace_event.h"
12 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/string16.h" 15 #include "base/string16.h"
16 #include "base/time.h" 16 #include "base/time.h"
17 #include "base/utf_string_conversions.h" 17 #include "base/utf_string_conversions.h"
18 #include "base/win/win_util.h" 18 #include "base/win/win_util.h"
19 #include "chrome/app/chrome_command_ids.h" 19 #include "chrome/app/chrome_command_ids.h"
20 #include "chrome/app/chrome_dll_resource.h" 20 #include "chrome/app/chrome_dll_resource.h"
21 #include "chrome/browser/automation/automation_provider.h" 21 #include "chrome/browser/automation/automation_provider.h"
22 #include "chrome/browser/debugger/devtools_toggle_action.h" 22 #include "chrome/browser/debugger/devtools_toggle_action.h"
23 #include "chrome/browser/debugger/devtools_window.h" 23 #include "chrome/browser/debugger/devtools_window.h"
24 #include "chrome/browser/file_select_helper.h" 24 #include "chrome/browser/file_select_helper.h"
25 #include "chrome/browser/history/history_tab_helper.h" 25 #include "chrome/browser/history/history_tab_helper.h"
26 #include "chrome/browser/history/history_types.h" 26 #include "chrome/browser/history/history_types.h"
27 #include "chrome/browser/infobars/infobar_tab_helper.h" 27 #include "chrome/browser/infobars/infobar_tab_helper.h"
28 #include "chrome/browser/pepper_broker_infobar_delegate.h"
28 #include "chrome/browser/profiles/profile.h" 29 #include "chrome/browser/profiles/profile.h"
29 #include "chrome/browser/repost_form_warning_controller.h" 30 #include "chrome/browser/repost_form_warning_controller.h"
30 #include "chrome/browser/themes/theme_service.h" 31 #include "chrome/browser/themes/theme_service.h"
31 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h" 32 #include "chrome/browser/ui/app_modal_dialogs/javascript_dialog_creator.h"
32 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" 33 #include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
33 #include "chrome/browser/ui/browser.h" 34 #include "chrome/browser/ui/browser.h"
34 #include "chrome/browser/ui/browser_window.h" 35 #include "chrome/browser/ui/browser_window.h"
35 #include "chrome/browser/ui/tab_contents/tab_contents.h" 36 #include "chrome/browser/ui/tab_contents/tab_contents.h"
36 #include "chrome/browser/ui/tab_modal_confirm_dialog.h" 37 #include "chrome/browser/ui/tab_modal_confirm_dialog.h"
37 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" 38 #include "chrome/browser/ui/views/infobars/infobar_container_view.h"
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 active_match_ordinal, final_update); 820 active_match_ordinal, final_update);
820 } 821 }
821 822
822 void ExternalTabContainerWin::RequestMediaAccessPermission( 823 void ExternalTabContainerWin::RequestMediaAccessPermission(
823 content::WebContents* web_contents, 824 content::WebContents* web_contents,
824 const content::MediaStreamRequest* request, 825 const content::MediaStreamRequest* request,
825 const content::MediaResponseCallback& callback) { 826 const content::MediaResponseCallback& callback) {
826 Browser::RequestMediaAccessPermissionHelper(web_contents, request, callback); 827 Browser::RequestMediaAccessPermissionHelper(web_contents, request, callback);
827 } 828 }
828 829
830 bool ExternalTabContainerWin::RequestPpapiBrokerPermission(
831 WebContents* web_contents,
832 const GURL& url,
833 const FilePath& plugin_path,
834 const base::Callback<void(bool)>& callback) {
835 PepperBrokerInfoBarDelegate::Show(web_contents, url, plugin_path, callback);
836 return true;
837 }
838
829 bool ExternalTabContainerWin::OnMessageReceived(const IPC::Message& message) { 839 bool ExternalTabContainerWin::OnMessageReceived(const IPC::Message& message) {
830 bool handled = true; 840 bool handled = true;
831 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainerWin, message) 841 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainerWin, message)
832 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost, 842 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost,
833 OnForwardMessageToExternalHost) 843 OnForwardMessageToExternalHost)
834 IPC_MESSAGE_UNHANDLED(handled = false) 844 IPC_MESSAGE_UNHANDLED(handled = false)
835 IPC_END_MESSAGE_MAP() 845 IPC_END_MESSAGE_MAP()
836 return handled; 846 return handled;
837 } 847 }
838 848
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
1273 if (params.disposition == CURRENT_TAB) { 1283 if (params.disposition == CURRENT_TAB) {
1274 DCHECK(route_all_top_level_navigations_); 1284 DCHECK(route_all_top_level_navigations_);
1275 forward_params.disposition = NEW_FOREGROUND_TAB; 1285 forward_params.disposition = NEW_FOREGROUND_TAB;
1276 } 1286 }
1277 WebContents* new_contents = 1287 WebContents* new_contents =
1278 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1288 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1279 // support only one navigation for a dummy tab before it is killed. 1289 // support only one navigation for a dummy tab before it is killed.
1280 ::DestroyWindow(GetNativeView()); 1290 ::DestroyWindow(GetNativeView());
1281 return new_contents; 1291 return new_contents;
1282 } 1292 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/external_tab_container_win.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698