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

Side by Side Diff: ash/shell.cc

Issue 9702024: ash: Take the 24h clock pref into consideration when showing the time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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 | « ash/shell.h ('k') | ash/system/power/date_format_observer.h » ('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 (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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/app_list/app_list.h" 9 #include "ash/app_list/app_list.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 } 241 }
242 242
243 virtual bool SystemShouldUpgrade() const OVERRIDE { 243 virtual bool SystemShouldUpgrade() const OVERRIDE {
244 return true; 244 return true;
245 } 245 }
246 246
247 virtual int GetSystemUpdateIconResource() const OVERRIDE { 247 virtual int GetSystemUpdateIconResource() const OVERRIDE {
248 return IDR_AURA_UBER_TRAY_UPDATE; 248 return IDR_AURA_UBER_TRAY_UPDATE;
249 } 249 }
250 250
251 virtual base::HourClockType GetHourClockType() const OVERRIDE {
252 return base::k24HourClock;
253 }
254
251 virtual void ShowSettings() OVERRIDE { 255 virtual void ShowSettings() OVERRIDE {
252 } 256 }
253 257
254 virtual void ShowDateSettings() OVERRIDE { 258 virtual void ShowDateSettings() OVERRIDE {
255 } 259 }
256 260
257 virtual void ShowHelp() OVERRIDE { 261 virtual void ShowHelp() OVERRIDE {
258 } 262 }
259 263
260 virtual bool IsAudioMuted() const OVERRIDE { 264 virtual bool IsAudioMuted() const OVERRIDE {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 //////////////////////////////////////////////////////////////////////////////// 318 ////////////////////////////////////////////////////////////////////////////////
315 // Shell, public: 319 // Shell, public:
316 320
317 Shell::Shell(ShellDelegate* delegate) 321 Shell::Shell(ShellDelegate* delegate)
318 : root_window_(new aura::RootWindow), 322 : root_window_(new aura::RootWindow),
319 screen_(new ScreenAsh(root_window_.get())), 323 screen_(new ScreenAsh(root_window_.get())),
320 root_filter_(NULL), 324 root_filter_(NULL),
321 delegate_(delegate), 325 delegate_(delegate),
322 audio_controller_(NULL), 326 audio_controller_(NULL),
323 brightness_controller_(NULL), 327 brightness_controller_(NULL),
328 date_format_observer_(NULL),
324 network_controller_(NULL), 329 network_controller_(NULL),
325 power_status_controller_(NULL), 330 power_status_controller_(NULL),
326 update_controller_(NULL), 331 update_controller_(NULL),
327 shelf_(NULL), 332 shelf_(NULL),
328 desktop_background_mode_(BACKGROUND_IMAGE), 333 desktop_background_mode_(BACKGROUND_IMAGE),
329 root_window_layout_(NULL), 334 root_window_layout_(NULL),
330 status_widget_(NULL) { 335 status_widget_(NULL) {
331 gfx::Screen::SetInstance(screen_); 336 gfx::Screen::SetInstance(screen_);
332 } 337 }
333 338
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if (!tray_delegate_.get()) 477 if (!tray_delegate_.get())
473 tray_delegate_.reset(new DummySystemTrayDelegate()); 478 tray_delegate_.reset(new DummySystemTrayDelegate());
474 479
475 internal::TrayVolume* tray_volume = new internal::TrayVolume(); 480 internal::TrayVolume* tray_volume = new internal::TrayVolume();
476 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); 481 internal::TrayBrightness* tray_brightness = new internal::TrayBrightness();
477 internal::TrayPowerDate* tray_power_date = new internal::TrayPowerDate(); 482 internal::TrayPowerDate* tray_power_date = new internal::TrayPowerDate();
478 internal::TrayNetwork* tray_network = new internal::TrayNetwork; 483 internal::TrayNetwork* tray_network = new internal::TrayNetwork;
479 internal::TrayUser* tray_user = new internal::TrayUser; 484 internal::TrayUser* tray_user = new internal::TrayUser;
480 audio_controller_ = tray_volume; 485 audio_controller_ = tray_volume;
481 brightness_controller_ = tray_brightness; 486 brightness_controller_ = tray_brightness;
487 date_format_observer_ = tray_power_date;
482 network_controller_ = tray_network; 488 network_controller_ = tray_network;
483 power_status_controller_ = tray_power_date; 489 power_status_controller_ = tray_power_date;
484 update_controller_ = tray_user; 490 update_controller_ = tray_user;
485 491
486 tray_->AddTrayItem(tray_user); 492 tray_->AddTrayItem(tray_user);
487 tray_->AddTrayItem(new internal::TrayEmpty()); 493 tray_->AddTrayItem(new internal::TrayEmpty());
488 tray_->AddTrayItem(tray_power_date); 494 tray_->AddTrayItem(tray_power_date);
489 tray_->AddTrayItem(tray_network); 495 tray_->AddTrayItem(tray_network);
490 tray_->AddTrayItem(tray_volume); 496 tray_->AddTrayItem(tray_volume);
491 tray_->AddTrayItem(tray_brightness); 497 tray_->AddTrayItem(tray_brightness);
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 // Create the desktop background image. 665 // Create the desktop background image.
660 SetDesktopBackgroundMode(BACKGROUND_IMAGE); 666 SetDesktopBackgroundMode(BACKGROUND_IMAGE);
661 } 667 }
662 668
663 void Shell::DisableWorkspaceGridLayout() { 669 void Shell::DisableWorkspaceGridLayout() {
664 if (workspace_controller_.get()) 670 if (workspace_controller_.get())
665 workspace_controller_->workspace_manager()->set_grid_size(0); 671 workspace_controller_->workspace_manager()->set_grid_size(0);
666 } 672 }
667 673
668 } // namespace ash 674 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/system/power/date_format_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698