| 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 "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 | 35 |
| 36 gfx::NativeWindow GetDialogParent() { | 36 gfx::NativeWindow GetDialogParent() { |
| 37 if (chromeos::BaseLoginDisplayHost::default_host()) { | 37 if (chromeos::BaseLoginDisplayHost::default_host()) { |
| 38 return chromeos::BaseLoginDisplayHost::default_host()->GetNativeWindow(); | 38 return chromeos::BaseLoginDisplayHost::default_host()->GetNativeWindow(); |
| 39 } else { | 39 } else { |
| 40 Browser* browser = browser::FindTabbedBrowser( | 40 Browser* browser = browser::FindTabbedBrowser( |
| 41 ProfileManager::GetDefaultProfileOrOffTheRecord(), true); | 41 ProfileManager::GetDefaultProfileOrOffTheRecord(), true); |
| 42 if (browser) | 42 if (browser) |
| 43 return browser->window()->GetNativeHandle(); | 43 return browser->window()->GetNativeWindow(); |
| 44 } | 44 } |
| 45 return NULL; | 45 return NULL; |
| 46 } | 46 } |
| 47 | 47 |
| 48 // Avoid global static initializer. | 48 // Avoid global static initializer. |
| 49 chromeos::NetworkConfigView** GetActiveDialogPointer() { | 49 chromeos::NetworkConfigView** GetActiveDialogPointer() { |
| 50 static chromeos::NetworkConfigView* active_dialog = NULL; | 50 static chromeos::NetworkConfigView* active_dialog = NULL; |
| 51 return &active_dialog; | 51 return &active_dialog; |
| 52 } | 52 } |
| 53 | 53 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 image_view_ = new views::ImageView(); | 321 image_view_ = new views::ImageView(); |
| 322 // Disable |image_view_| so mouse events propagate to the parent. | 322 // Disable |image_view_| so mouse events propagate to the parent. |
| 323 image_view_->SetEnabled(false); | 323 image_view_->SetEnabled(false); |
| 324 image_view_->SetImage(gray_image_); | 324 image_view_->SetImage(gray_image_); |
| 325 image_view_->SetTooltipText( | 325 image_view_->SetTooltipText( |
| 326 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); | 326 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); |
| 327 AddChildView(image_view_); | 327 AddChildView(image_view_); |
| 328 } | 328 } |
| 329 | 329 |
| 330 } // namespace chromeos | 330 } // namespace chromeos |
| OLD | NEW |