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 "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 Loading... |
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 Loading... |
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 } |
OLD | NEW |