OLD | NEW |
---|---|
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/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" | |
9 #include "content/public/browser/web_contents.h" | |
10 | |
11 using content::WebContents; | |
7 | 12 |
8 // static | 13 // static |
9 void ExternalProtocolHandler::RunExternalProtocolDialog( | 14 void ExternalProtocolHandler::RunExternalProtocolDialog( |
10 const GURL& url, int render_process_host_id, int routing_id) { | 15 const GURL& url, int render_process_host_id, int routing_id) { |
11 NOTIMPLEMENTED() << "TODO(mkosiba): Upstream the actual implementation."; | 16 WebContents* web_contents = tab_util::GetWebContentsByID( |
17 render_process_host_id, routing_id); | |
18 if (web_contents) { | |
19 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); | |
20 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.
| |
21 } | |
12 } | 22 } |
OLD | NEW |