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

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: rebase and fix test Created 5 years, 7 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,
38 bool has_user_gesture) {
35 WebContents* web_contents = tab_util::GetWebContentsByID( 39 WebContents* web_contents = tab_util::GetWebContentsByID(
36 render_process_host_id, routing_id); 40 render_process_host_id, routing_id);
37 new ExternalProtocolDialog(web_contents, url); 41 new ExternalProtocolDialog(web_contents, url);
38 } 42 }
39 43
40 /////////////////////////////////////////////////////////////////////////////// 44 ///////////////////////////////////////////////////////////////////////////////
41 // ExternalProtocolDialog 45 // ExternalProtocolDialog
42 46
43 ExternalProtocolDialog::~ExternalProtocolDialog() { 47 ExternalProtocolDialog::~ExternalProtocolDialog() {
44 } 48 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 111
108 gfx::NativeWindow parent_window; 112 gfx::NativeWindow parent_window;
109 if (web_contents) { 113 if (web_contents) {
110 parent_window = web_contents->GetTopLevelNativeWindow(); 114 parent_window = web_contents->GetTopLevelNativeWindow();
111 } else { 115 } else {
112 // Dialog is top level if we don't have a web_contents associated with us. 116 // Dialog is top level if we don't have a web_contents associated with us.
113 parent_window = NULL; 117 parent_window = NULL;
114 } 118 }
115 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show(); 119 views::DialogDelegate::CreateDialogWidget(this, NULL, parent_window)->Show();
116 } 120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698