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

Side by Side Diff: chrome/browser/chromeos/external_protocol_dialog.cc

Issue 1091253008: Fix an issue that external protocol in subframes are not handled on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
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/chromeos/external_protocol_dialog.h" 5 #include "chrome/browser/chromeos/external_protocol_dialog.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/external_protocol/external_protocol_handler.h" 10 #include "chrome/browser/external_protocol/external_protocol_handler.h"
(...skipping 13 matching lines...) Expand all
24 24
25 const int kMessageWidth = 400; 25 const int kMessageWidth = 400;
26 26
27 } // namespace 27 } // namespace
28 28
29 /////////////////////////////////////////////////////////////////////////////// 29 ///////////////////////////////////////////////////////////////////////////////
30 // ExternalProtocolHandler 30 // ExternalProtocolHandler
31 31
32 // static 32 // static
33 void ExternalProtocolHandler::RunExternalProtocolDialog( 33 void ExternalProtocolHandler::RunExternalProtocolDialog(
34 const GURL& url, int render_process_host_id, int routing_id) { 34 const GURL& url,
35 int render_process_host_id,
36 int routing_id,
37 ui::PageTransition page_transition) {
35 WebContents* web_contents = tab_util::GetWebContentsByID( 38 WebContents* web_contents = tab_util::GetWebContentsByID(
36 render_process_host_id, routing_id); 39 render_process_host_id, routing_id);
37 new ExternalProtocolDialog(web_contents, url); 40 new ExternalProtocolDialog(web_contents, url);
38 } 41 }
39 42
40 /////////////////////////////////////////////////////////////////////////////// 43 ///////////////////////////////////////////////////////////////////////////////
41 // ExternalProtocolDialog 44 // ExternalProtocolDialog
42 45
43 ExternalProtocolDialog::~ExternalProtocolDialog() { 46 ExternalProtocolDialog::~ExternalProtocolDialog() {
44 } 47 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 110
108 gfx::NativeWindow parent_window; 111 gfx::NativeWindow parent_window;
109 if (web_contents) { 112 if (web_contents) {
110 parent_window = web_contents->GetTopLevelNativeWindow(); 113 parent_window = web_contents->GetTopLevelNativeWindow();
111 } else { 114 } else {
112 // Dialog is top level if we don't have a web_contents associated with us. 115 // Dialog is top level if we don't have a web_contents associated with us.
113 parent_window = NULL; 116 parent_window = NULL;
114 } 117 }
115 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show(); 118 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show();
116 } 119 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698