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

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

Issue 1661713002: Remove the rest of HostDesktopType from c/b/ui/browser_finder.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-11
Patch Set: linux adl Created 4 years, 10 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
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 "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace chromeos { 43 namespace chromeos {
44 44
45 namespace { 45 namespace {
46 46
47 gfx::NativeWindow GetParentForUnhostedDialog() { 47 gfx::NativeWindow GetParentForUnhostedDialog() {
48 if (LoginDisplayHost::default_host()) { 48 if (LoginDisplayHost::default_host()) {
49 return LoginDisplayHost::default_host()->GetNativeWindow(); 49 return LoginDisplayHost::default_host()->GetNativeWindow();
50 } else { 50 } else {
51 Browser* browser = chrome::FindTabbedBrowser( 51 Browser* browser = chrome::FindTabbedBrowser(
52 ProfileManager::GetPrimaryUserProfile(), 52 ProfileManager::GetPrimaryUserProfile(), true);
53 true,
54 chrome::HOST_DESKTOP_TYPE_ASH);
55 if (browser) 53 if (browser)
56 return browser->window()->GetNativeWindow(); 54 return browser->window()->GetNativeWindow();
57 } 55 }
58 return nullptr; 56 return nullptr;
59 } 57 }
60 58
61 // Avoid global static initializer. 59 // Avoid global static initializer.
62 NetworkConfigView** GetActiveDialogPointer() { 60 NetworkConfigView** GetActiveDialogPointer() {
63 static NetworkConfigView* active_dialog = nullptr; 61 static NetworkConfigView* active_dialog = nullptr;
64 return &active_dialog; 62 return &active_dialog;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 image_view_ = new views::ImageView(); 351 image_view_ = new views::ImageView();
354 // Disable |image_view_| so mouse events propagate to the parent. 352 // Disable |image_view_| so mouse events propagate to the parent.
355 image_view_->SetEnabled(false); 353 image_view_->SetEnabled(false);
356 image_view_->SetImage(image_); 354 image_view_->SetImage(image_);
357 image_view_->SetTooltipText( 355 image_view_->SetTooltipText(
358 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); 356 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY));
359 AddChildView(image_view_); 357 AddChildView(image_view_);
360 } 358 }
361 359
362 } // namespace chromeos 360 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698