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

Unified Diff: chrome/browser/ui/android/external_protocol_dialog_android.cc

Issue 11193014: [Android] Upstream external_protocol_dialog_android.cc (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/android/external_protocol_dialog_android.cc
diff --git a/chrome/browser/ui/android/external_protocol_dialog_android.cc b/chrome/browser/ui/android/external_protocol_dialog_android.cc
index b47057b8a4abddc7ca43d1f5404b7aebefa43b4f..51171640a4846a4463f794e3c9afd52a900d89f5 100644
--- a/chrome/browser/ui/android/external_protocol_dialog_android.cc
+++ b/chrome/browser/ui/android/external_protocol_dialog_android.cc
@@ -3,10 +3,20 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "chrome/browser/android/tab_android.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
+#include "chrome/browser/tab_contents/tab_util.h"
+#include "content/public/browser/web_contents.h"
+
+using content::WebContents;
// static
void ExternalProtocolHandler::RunExternalProtocolDialog(
const GURL& url, int render_process_host_id, int routing_id) {
- NOTIMPLEMENTED() << "TODO(mkosiba): Upstream the actual implementation.";
+ WebContents* web_contents = tab_util::GetWebContentsByID(
+ render_process_host_id, routing_id);
+ if (web_contents) {
+ TabAndroid* tab = TabAndroid::FromWebContents(web_contents);
+ if (tab) return tab->RunExternalProtocolDialog(url);
Ted C 2012/10/16 22:58:15 c++ style is to have this on the following line
newt (away) 2012/10/16 23:19:42 Done.
+ }
}

Powered by Google App Engine
This is Rietveld 408576698