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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 11434074: browser: Move FindBrowserWithWebContents() into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 OnStartDownload(source, download); 431 OnStartDownload(source, download);
432 } 432 }
433 433
434 void ExtensionHost::WebIntentDispatch( 434 void ExtensionHost::WebIntentDispatch(
435 content::WebContents* web_contents, 435 content::WebContents* web_contents,
436 content::WebIntentsDispatcher* intents_dispatcher) { 436 content::WebIntentsDispatcher* intents_dispatcher) {
437 #if !defined(OS_ANDROID) 437 #if !defined(OS_ANDROID)
438 scoped_ptr<content::WebIntentsDispatcher> dispatcher(intents_dispatcher); 438 scoped_ptr<content::WebIntentsDispatcher> dispatcher(intents_dispatcher);
439 439
440 Browser* browser = view() ? view()->browser() 440 Browser* browser = view() ? view()->browser()
441 : browser::FindBrowserWithWebContents(web_contents); 441 : chrome::FindBrowserWithWebContents(web_contents);
442 442
443 // For background scripts/pages, there will be no view(). In this case, we 443 // For background scripts/pages, there will be no view(). In this case, we
444 // want to treat the intent as a browser-initiated one and deliver it into the 444 // want to treat the intent as a browser-initiated one and deliver it into the
445 // current browser. It probably came from a context menu click or similar. 445 // current browser. It probably came from a context menu click or similar.
446 if (!browser) 446 if (!browser)
447 browser = web_intents::GetBrowserForBackgroundWebIntentDelivery(profile()); 447 browser = web_intents::GetBrowserForBackgroundWebIntentDelivery(profile());
448 448
449 if (browser) { 449 if (browser) {
450 static_cast<WebContentsDelegate*>(browser)-> 450 static_cast<WebContentsDelegate*>(browser)->
451 WebIntentDispatch(NULL, dispatcher.release()); 451 WebIntentDispatch(NULL, dispatcher.release());
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 void ExtensionHost::RequestMediaAccessPermission( 666 void ExtensionHost::RequestMediaAccessPermission(
667 content::WebContents* web_contents, 667 content::WebContents* web_contents,
668 const content::MediaStreamRequest* request, 668 const content::MediaStreamRequest* request,
669 const content::MediaResponseCallback& callback) { 669 const content::MediaResponseCallback& callback) {
670 // For tab capture device, we require the tabCapture permission. 670 // For tab capture device, we require the tabCapture permission.
671 RequestMediaAccessPermissionHelper::AuthorizeRequest( 671 RequestMediaAccessPermissionHelper::AuthorizeRequest(
672 request, callback, extension(), false); 672 request, callback, extension(), false);
673 } 673 }
674 674
675 } // namespace extensions 675 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui_impl.cc ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698