OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/external_protocol_handler.h" | 10 #include "chrome/browser/external_protocol_handler.h" |
11 #include "chrome/browser/tab_contents/tab_contents.h" | |
12 #include "chrome/browser/tab_contents/tab_contents_view.h" | |
13 #include "chrome/browser/tab_contents/tab_util.h" | 11 #include "chrome/browser/tab_contents/tab_util.h" |
14 #include "chrome/browser/ui/views/window.h" | 12 #include "chrome/browser/ui/views/window.h" |
| 13 #include "content/browser/tab_contents/tab_contents.h" |
| 14 #include "content/browser/tab_contents/tab_contents_view.h" |
15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "grit/chromium_strings.h" | 16 #include "grit/chromium_strings.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "ui/base/l10n/l10n_util.h" | 18 #include "ui/base/l10n/l10n_util.h" |
19 #include "ui/base/message_box_flags.h" | 19 #include "ui/base/message_box_flags.h" |
20 #include "ui/base/text/text_elider.h" | 20 #include "ui/base/text/text_elider.h" |
21 #include "views/controls/message_box_view.h" | 21 #include "views/controls/message_box_view.h" |
22 #include "views/window/window.h" | 22 #include "views/window/window.h" |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 gfx::NativeWindow parent_window; | 107 gfx::NativeWindow parent_window; |
108 if (tab_contents) { | 108 if (tab_contents) { |
109 parent_window = tab_contents->view()->GetTopLevelNativeWindow(); | 109 parent_window = tab_contents->view()->GetTopLevelNativeWindow(); |
110 } else { | 110 } else { |
111 // Dialog is top level if we don't have a tab_contents associated with us. | 111 // Dialog is top level if we don't have a tab_contents associated with us. |
112 parent_window = NULL; | 112 parent_window = NULL; |
113 } | 113 } |
114 browser::CreateViewsWindow(parent_window, gfx::Rect(), this)->Show(); | 114 browser::CreateViewsWindow(parent_window, gfx::Rect(), this)->Show(); |
115 } | 115 } |
OLD | NEW |