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/options/network_config_view.h" | 5 #include "chrome/browser/chromeos/options/network_config_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/shell.h" | 9 #include "ash/shell.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/chromeos/cros/network_property_ui_data.h" | 12 #include "chrome/browser/chromeos/cros/network_property_ui_data.h" |
13 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 13 #include "chrome/browser/chromeos/login/login_display_host_impl.h" |
14 #include "chrome/browser/chromeos/options/vpn_config_view.h" | 14 #include "chrome/browser/chromeos/options/vpn_config_view.h" |
15 #include "chrome/browser/chromeos/options/wifi_config_view.h" | 15 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
16 #include "chrome/browser/chromeos/options/wimax_config_view.h" | 16 #include "chrome/browser/chromeos/options/wimax_config_view.h" |
17 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_finder.h" | 19 #include "chrome/browser/ui/browser_finder.h" |
20 #include "chrome/browser/ui/browser_window.h" | 20 #include "chrome/browser/ui/browser_window.h" |
21 #include "chrome/browser/ui/host_desktop.h" | 21 #include "chrome/browser/ui/host_desktop.h" |
22 #include "grit/chromium_strings.h" | 22 #include "grit/chromium_strings.h" |
23 #include "grit/generated_resources.h" | 23 #include "grit/generated_resources.h" |
24 #include "grit/locale_settings.h" | 24 #include "grit/locale_settings.h" |
25 #include "grit/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "ui/aura/root_window.h" | 26 #include "ui/aura/root_window.h" |
27 #include "ui/base/accessibility/accessible_view_state.h" | 27 #include "ui/base/accessibility/accessible_view_state.h" |
28 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
30 #include "ui/gfx/image/image.h" | 30 #include "ui/gfx/image/image.h" |
31 #include "ui/gfx/rect.h" | 31 #include "ui/gfx/rect.h" |
32 #include "ui/views/controls/button/label_button.h" | 32 #include "ui/views/controls/button/label_button.h" |
33 #include "ui/views/controls/image_view.h" | 33 #include "ui/views/controls/image_view.h" |
34 #include "ui/views/layout/layout_constants.h" | 34 #include "ui/views/layout/layout_constants.h" |
35 #include "ui/views/widget/widget.h" | 35 #include "ui/views/widget/widget.h" |
36 | 36 |
37 using views::Widget; | 37 using views::Widget; |
38 | 38 |
39 namespace { | 39 namespace { |
40 | 40 |
41 gfx::NativeWindow GetDialogParent() { | 41 gfx::NativeWindow GetDialogParent() { |
42 if (chromeos::BaseLoginDisplayHost::default_host()) { | 42 if (chromeos::LoginDisplayHostImpl::default_host()) { |
43 return chromeos::BaseLoginDisplayHost::default_host()->GetNativeWindow(); | 43 return chromeos::LoginDisplayHostImpl::default_host()->GetNativeWindow(); |
44 } else { | 44 } else { |
45 Browser* browser = chrome::FindTabbedBrowser( | 45 Browser* browser = chrome::FindTabbedBrowser( |
46 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 46 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
47 true, | 47 true, |
48 chrome::HOST_DESKTOP_TYPE_ASH); | 48 chrome::HOST_DESKTOP_TYPE_ASH); |
49 if (browser) | 49 if (browser) |
50 return browser->window()->GetNativeWindow(); | 50 return browser->window()->GetNativeWindow(); |
51 } | 51 } |
52 return NULL; | 52 return NULL; |
53 } | 53 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 image_view_ = new views::ImageView(); | 306 image_view_ = new views::ImageView(); |
307 // Disable |image_view_| so mouse events propagate to the parent. | 307 // Disable |image_view_| so mouse events propagate to the parent. |
308 image_view_->SetEnabled(false); | 308 image_view_->SetEnabled(false); |
309 image_view_->SetImage(gray_image_); | 309 image_view_->SetImage(gray_image_); |
310 image_view_->SetTooltipText( | 310 image_view_->SetTooltipText( |
311 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); | 311 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); |
312 AddChildView(image_view_); | 312 AddChildView(image_view_); |
313 } | 313 } |
314 | 314 |
315 } // namespace chromeos | 315 } // namespace chromeos |
OLD | NEW |