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

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

Issue 10854040: Add hooks to content to request permission to connect to the PPAPI broker. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix 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 809 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 active_match_ordinal, final_update); 820 active_match_ordinal, final_update);
821 } 821 }
822 822
823 void ExternalTabContainerWin::RequestMediaAccessPermission( 823 void ExternalTabContainerWin::RequestMediaAccessPermission(
824 content::WebContents* web_contents, 824 content::WebContents* web_contents,
825 const content::MediaStreamRequest* request, 825 const content::MediaStreamRequest* request,
826 const content::MediaResponseCallback& callback) { 826 const content::MediaResponseCallback& callback) {
827 Browser::RequestMediaAccessPermissionHelper(web_contents, request, callback); 827 Browser::RequestMediaAccessPermissionHelper(web_contents, request, callback);
828 } 828 }
829 829
830 void ExternalTabContainerWin::RequestPpapiBrokerPermission(
ddorwin 2012/08/12 22:51:16 Why does this need to be overridden?
Bernhard Bauer 2012/08/13 09:02:11 The default implementation immediately returns fal
831 WebContents* web_contents,
832 const GURL& url,
833 const FilePath& plugin_path,
834 const base::Callback<void(bool)>& callback) {
835 Browser::RequestPpapiBrokerPermissionHelper(web_contents, url,
836 plugin_path, callback);
837 }
838
830 bool ExternalTabContainerWin::OnMessageReceived(const IPC::Message& message) { 839 bool ExternalTabContainerWin::OnMessageReceived(const IPC::Message& message) {
831 bool handled = true; 840 bool handled = true;
832 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainerWin, message) 841 IPC_BEGIN_MESSAGE_MAP(ExternalTabContainerWin, message)
833 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost, 842 IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ForwardMessageToExternalHost,
834 OnForwardMessageToExternalHost) 843 OnForwardMessageToExternalHost)
835 IPC_MESSAGE_UNHANDLED(handled = false) 844 IPC_MESSAGE_UNHANDLED(handled = false)
836 IPC_END_MESSAGE_MAP() 845 IPC_END_MESSAGE_MAP()
837 return handled; 846 return handled;
838 } 847 }
839 848
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 if (params.disposition == CURRENT_TAB) { 1263 if (params.disposition == CURRENT_TAB) {
1255 DCHECK(route_all_top_level_navigations_); 1264 DCHECK(route_all_top_level_navigations_);
1256 forward_params.disposition = NEW_FOREGROUND_TAB; 1265 forward_params.disposition = NEW_FOREGROUND_TAB;
1257 } 1266 }
1258 WebContents* new_contents = 1267 WebContents* new_contents =
1259 ExternalTabContainerWin::OpenURLFromTab(source, forward_params); 1268 ExternalTabContainerWin::OpenURLFromTab(source, forward_params);
1260 // support only one navigation for a dummy tab before it is killed. 1269 // support only one navigation for a dummy tab before it is killed.
1261 ::DestroyWindow(GetNativeView()); 1270 ::DestroyWindow(GetNativeView());
1262 return new_contents; 1271 return new_contents;
1263 } 1272 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698