Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 10377177: Fix build. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "chrome/browser/chromeos/login/base_login_display_host.h" 11 #include "chrome/browser/chromeos/login/base_login_display_host.h"
12 #include "chrome/browser/chromeos/options/vpn_config_view.h" 12 #include "chrome/browser/chromeos/options/vpn_config_view.h"
13 #include "chrome/browser/chromeos/options/wifi_config_view.h" 13 #include "chrome/browser/chromeos/options/wifi_config_view.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser.h" 15 #include "chrome/browser/ui/browser.h"
16 #include "chrome/browser/ui/browser_list.h" 16 #include "chrome/browser/ui/browser_finder.h"
17 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
18 #include "grit/chromium_strings.h" 18 #include "grit/chromium_strings.h"
19 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
20 #include "grit/locale_settings.h" 20 #include "grit/locale_settings.h"
21 #include "grit/theme_resources.h" 21 #include "grit/theme_resources.h"
22 #include "ui/base/accessibility/accessible_view_state.h" 22 #include "ui/base/accessibility/accessible_view_state.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
24 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
25 #include "ui/gfx/image/image.h" 25 #include "ui/gfx/image/image.h"
26 #include "ui/gfx/rect.h" 26 #include "ui/gfx/rect.h"
27 #include "ui/views/controls/button/text_button.h" 27 #include "ui/views/controls/button/text_button.h"
28 #include "ui/views/controls/image_view.h" 28 #include "ui/views/controls/image_view.h"
29 #include "ui/views/layout/grid_layout.h" 29 #include "ui/views/layout/grid_layout.h"
30 #include "ui/views/layout/layout_constants.h" 30 #include "ui/views/layout/layout_constants.h"
31 #include "ui/views/widget/widget.h" 31 #include "ui/views/widget/widget.h"
32 32
33 namespace { 33 namespace {
34 34
35 gfx::NativeWindow GetDialogParent() { 35 gfx::NativeWindow GetDialogParent() {
36 if (chromeos::BaseLoginDisplayHost::default_host()) { 36 if (chromeos::BaseLoginDisplayHost::default_host()) {
37 return chromeos::BaseLoginDisplayHost::default_host()->GetNativeWindow(); 37 return chromeos::BaseLoginDisplayHost::default_host()->GetNativeWindow();
38 } else { 38 } else {
39 Browser* browser = BrowserList::FindTabbedBrowser( 39 Browser* browser = browser::FindTabbedBrowser(
40 ProfileManager::GetDefaultProfileOrOffTheRecord(), true); 40 ProfileManager::GetDefaultProfileOrOffTheRecord(), true);
41 if (browser) 41 if (browser)
42 return browser->window()->GetNativeHandle(); 42 return browser->window()->GetNativeHandle();
43 } 43 }
44 return NULL; 44 return NULL;
45 } 45 }
46 46
47 // Avoid global static initializer. 47 // Avoid global static initializer.
48 chromeos::NetworkConfigView** GetActiveDialogPointer() { 48 chromeos::NetworkConfigView** GetActiveDialogPointer() {
49 static chromeos::NetworkConfigView* active_dialog = NULL; 49 static chromeos::NetworkConfigView* active_dialog = NULL;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 image_view_ = new views::ImageView(); 317 image_view_ = new views::ImageView();
318 // Disable |image_view_| so mouse events propagate to the parent. 318 // Disable |image_view_| so mouse events propagate to the parent.
319 image_view_->SetEnabled(false); 319 image_view_->SetEnabled(false);
320 image_view_->SetImage(gray_image_); 320 image_view_->SetImage(gray_image_);
321 image_view_->SetTooltipText( 321 image_view_->SetTooltipText(
322 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 322 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
323 AddChildView(image_view_); 323 AddChildView(image_view_);
324 } 324 }
325 325
326 } // namespace chromeos 326 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698