Chromium Code Reviews| 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/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 12 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 13 #include "chrome/browser/chromeos/options/network_property_ui_data.h" | 13 #include "chrome/browser/chromeos/options/network_property_ui_data.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 "chrome/grit/generated_resources.h" | 22 #include "chrome/grit/generated_resources.h" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 36 #include "ui/views/controls/button/label_button.h" | 36 #include "ui/views/controls/button/label_button.h" |
| 37 #include "ui/views/controls/image_view.h" | 37 #include "ui/views/controls/image_view.h" |
| 38 #include "ui/views/layout/layout_constants.h" | 38 #include "ui/views/layout/layout_constants.h" |
| 39 #include "ui/views/widget/widget.h" | 39 #include "ui/views/widget/widget.h" |
| 40 | 40 |
| 41 using views::Widget; | 41 using views::Widget; |
| 42 | 42 |
| 43 namespace { | 43 namespace { |
| 44 | 44 |
| 45 gfx::NativeWindow GetParentForUnhostedDialog() { | 45 gfx::NativeWindow GetParentForUnhostedDialog() { |
| 46 if (chromeos::LoginDisplayHostImpl::default_host()) { | 46 if (chromeos::LoginDisplayHost::default_host()) { |
|
achuithb
2016/01/21 23:14:31
move the anon namespace to within chromeos namespa
jdufault
2016/01/22 21:14:11
Done.
| |
| 47 return chromeos::LoginDisplayHostImpl::default_host()->GetNativeWindow(); | 47 return chromeos::LoginDisplayHost::default_host()->GetNativeWindow(); |
| 48 } else { | 48 } else { |
| 49 Browser* browser = chrome::FindTabbedBrowser( | 49 Browser* browser = chrome::FindTabbedBrowser( |
| 50 ProfileManager::GetPrimaryUserProfile(), | 50 ProfileManager::GetPrimaryUserProfile(), |
| 51 true, | 51 true, |
| 52 chrome::HOST_DESKTOP_TYPE_ASH); | 52 chrome::HOST_DESKTOP_TYPE_ASH); |
| 53 if (browser) | 53 if (browser) |
| 54 return browser->window()->GetNativeWindow(); | 54 return browser->window()->GetNativeWindow(); |
| 55 } | 55 } |
| 56 return NULL; | 56 return NULL; |
| 57 } | 57 } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 355 image_view_ = new views::ImageView(); | 355 image_view_ = new views::ImageView(); |
| 356 // Disable |image_view_| so mouse events propagate to the parent. | 356 // Disable |image_view_| so mouse events propagate to the parent. |
| 357 image_view_->SetEnabled(false); | 357 image_view_->SetEnabled(false); |
| 358 image_view_->SetImage(image_); | 358 image_view_->SetImage(image_); |
| 359 image_view_->SetTooltipText( | 359 image_view_->SetTooltipText( |
| 360 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); | 360 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); |
| 361 AddChildView(image_view_); | 361 AddChildView(image_view_); |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace chromeos | 364 } // namespace chromeos |
| OLD | NEW |