| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/message_box_flags.h" | 8 #include "app/message_box_flags.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "chrome/browser/external_protocol_handler.h" | 12 #include "chrome/browser/external_protocol_handler.h" |
| 13 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
| 14 #include "chrome/browser/tab_contents/tab_contents_view.h" | 14 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 15 #include "chrome/browser/tab_contents/tab_util.h" | 15 #include "chrome/browser/tab_contents/tab_util.h" |
| 16 #include "chrome/browser/views/window.h" |
| 16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 17 #include "grit/chromium_strings.h" | 18 #include "grit/chromium_strings.h" |
| 18 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
| 19 #include "views/controls/message_box_view.h" | 20 #include "views/controls/message_box_view.h" |
| 20 #include "views/window/window.h" | 21 #include "views/window/window.h" |
| 21 | 22 |
| 22 namespace { | 23 namespace { |
| 23 | 24 |
| 24 const int kMessageWidth = 400; | 25 const int kMessageWidth = 400; |
| 25 | 26 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 message_box_view_->SetCheckBoxLabel( | 101 message_box_view_->SetCheckBoxLabel( |
| 101 l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT)); | 102 l10n_util::GetString(IDS_EXTERNAL_PROTOCOL_CHECKBOX_TEXT)); |
| 102 | 103 |
| 103 gfx::NativeWindow parent_window; | 104 gfx::NativeWindow parent_window; |
| 104 if (tab_contents) { | 105 if (tab_contents) { |
| 105 parent_window = tab_contents->view()->GetTopLevelNativeWindow(); | 106 parent_window = tab_contents->view()->GetTopLevelNativeWindow(); |
| 106 } else { | 107 } else { |
| 107 // Dialog is top level if we don't have a tab_contents associated with us. | 108 // Dialog is top level if we don't have a tab_contents associated with us. |
| 108 parent_window = NULL; | 109 parent_window = NULL; |
| 109 } | 110 } |
| 110 views::Window::CreateChromeWindow(parent_window, gfx::Rect(), this)->Show(); | 111 browser::CreateViewsWindow(parent_window, gfx::Rect(), this)->Show(); |
| 111 } | 112 } |
| OLD | NEW |