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

Side by Side Diff: chrome/browser/ui/android/external_protocol_dialog_android.cc

Issue 11265013: [Android] Use resource throttle instead of HandleExternalProtocol. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "chrome/browser/android/tab_android.h" 6 #include "chrome/browser/android/tab_android.h"
7 #include "chrome/browser/external_protocol/external_protocol_handler.h" 7 #include "chrome/browser/external_protocol/external_protocol_handler.h"
8 #include "chrome/browser/tab_contents/tab_util.h" 8 #include "chrome/browser/tab_contents/tab_util.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
11 using content::WebContents; 11 using content::WebContents;
12 12
13 // static 13 // static
14 void ExternalProtocolHandler::RunExternalProtocolDialog( 14 void ExternalProtocolHandler::RunExternalProtocolDialog(
15 const GURL& url, int render_process_host_id, int routing_id) { 15 const GURL& url, int render_process_host_id, int routing_id) {
16 WebContents* web_contents = tab_util::GetWebContentsByID( 16 // Chrome on Android uses a throttle-based mechansim to intercept links
17 render_process_host_id, routing_id); 17 // so that the user may choose to run an Android application instead of
18 if (web_contents) { 18 // loading the link in the browser. This mechanism also handles external
19 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); 19 // protocols, so we don't need to do anything here.
mkosiba (inactive) 2012/10/25 09:02:12 NOTREACHED?
John Knottenbelt 2012/10/25 16:17:27 Done.
20 if (tab)
21 return tab->RunExternalProtocolDialog(url);
22 }
23 } 20 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698