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

Side by Side Diff: ash/system/chromeos/brightness/tray_brightness.cc

Issue 2113053003: Moves Shell::maximize_mode_controller() to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 5 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
« no previous file with comments | « ash/shell.cc ('k') | ash/system/chromeos/brightness/tray_brightness_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "ash/system/chromeos/brightness/tray_brightness.h" 5 #include "ash/system/chromeos/brightness/tray_brightness.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/accelerators/accelerator_controller.h" 9 #include "ash/accelerators/accelerator_controller.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 slider_ = new views::Slider(this, views::Slider::HORIZONTAL); 107 slider_ = new views::Slider(this, views::Slider::HORIZONTAL);
108 slider_->set_focus_border_color(kFocusBorderColor); 108 slider_->set_focus_border_color(kFocusBorderColor);
109 slider_->SetValue(static_cast<float>(initial_percent / 100.0)); 109 slider_->SetValue(static_cast<float>(initial_percent / 100.0));
110 slider_->SetAccessibleName( 110 slider_->SetAccessibleName(
111 ui::ResourceBundle::GetSharedInstance().GetLocalizedString( 111 ui::ResourceBundle::GetSharedInstance().GetLocalizedString(
112 IDS_ASH_STATUS_TRAY_BRIGHTNESS)); 112 IDS_ASH_STATUS_TRAY_BRIGHTNESS));
113 AddChildView(slider_); 113 AddChildView(slider_);
114 114
115 if (is_default_view_) { 115 if (is_default_view_) {
116 WmShell::Get()->AddShellObserver(this); 116 WmShell::Get()->AddShellObserver(this);
117 SetVisible(Shell::GetInstance() 117 SetVisible(WmShell::Get()
118 ->maximize_mode_controller() 118 ->maximize_mode_controller()
119 ->IsMaximizeModeWindowManagerEnabled()); 119 ->IsMaximizeModeWindowManagerEnabled());
120 } 120 }
121 } 121 }
122 122
123 BrightnessView::~BrightnessView() { 123 BrightnessView::~BrightnessView() {
124 if (is_default_view_) 124 if (is_default_view_)
125 WmShell::Get()->RemoveShellObserver(this); 125 WmShell::Get()->RemoveShellObserver(this);
126 } 126 }
127 127
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 if (!display::Display::HasInternalDisplay()) 271 if (!display::Display::HasInternalDisplay())
272 return; 272 return;
273 273
274 if (brightness_view_) 274 if (brightness_view_)
275 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 275 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
276 else 276 else
277 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 277 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
278 } 278 }
279 279
280 } // namespace ash 280 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.cc ('k') | ash/system/chromeos/brightness/tray_brightness_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698