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

Side by Side Diff: ash/system/tray/system_tray.cc

Issue 9706063: ash: A number of ui/ux changes from feedback/to better match the mocks. (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/system/power/tray_power_date.cc ('k') | ash/system/tray/tray_constants.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/system/tray/system_tray.h" 5 #include "ash/system/tray/system_tray.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell/panel_window.h" 8 #include "ash/shell/panel_window.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/tray/tray_constants.h"
10 #include "ash/system/tray/system_tray_delegate.h" 11 #include "ash/system/tray/system_tray_delegate.h"
11 #include "ash/system/tray/system_tray_item.h" 12 #include "ash/system/tray/system_tray_item.h"
12 #include "ash/system/user/login_status.h" 13 #include "ash/system/user/login_status.h"
13 #include "ash/wm/shadow_types.h" 14 #include "ash/wm/shadow_types.h"
14 #include "ash/wm/window_animations.h" 15 #include "ash/wm/window_animations.h"
15 #include "base/logging.h" 16 #include "base/logging.h"
16 #include "base/timer.h" 17 #include "base/timer.h"
17 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
18 #include "third_party/skia/include/core/SkCanvas.h" 19 #include "third_party/skia/include/core/SkCanvas.h"
19 #include "third_party/skia/include/core/SkColor.h" 20 #include "third_party/skia/include/core/SkColor.h"
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 audio_controller_(NULL), 292 audio_controller_(NULL),
292 brightness_controller_(NULL), 293 brightness_controller_(NULL),
293 date_format_observer_(NULL), 294 date_format_observer_(NULL),
294 network_controller_(NULL), 295 network_controller_(NULL),
295 power_status_controller_(NULL), 296 power_status_controller_(NULL),
296 update_controller_(NULL), 297 update_controller_(NULL),
297 bubble_(NULL), 298 bubble_(NULL),
298 popup_(NULL) { 299 popup_(NULL) {
299 container_ = new views::View; 300 container_ = new views::View;
300 container_->SetLayoutManager(new views::BoxLayout( 301 container_->SetLayoutManager(new views::BoxLayout(
301 views::BoxLayout::kHorizontal, 5, 0, 3)); 302 views::BoxLayout::kHorizontal, 5, 0, kTrayPaddingBetweenItems));
302 container_->set_background(new SystemTrayBackground); 303 container_->set_background(new SystemTrayBackground);
303 set_border(views::Border::CreateEmptyBorder(0, 0, 304 set_border(views::Border::CreateEmptyBorder(0, 0,
304 kPaddingFromBottomOfScreen, kPaddingFromRightEdgeOfScreen)); 305 kPaddingFromBottomOfScreen, kPaddingFromRightEdgeOfScreen));
305 set_notify_enter_exit_on_child(true); 306 set_notify_enter_exit_on_child(true);
306 set_focusable(true); 307 set_focusable(true);
307 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 308 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
308 AddChildView(container_); 309 AddChildView(container_);
309 } 310 }
310 311
311 SystemTray::~SystemTray() { 312 SystemTray::~SystemTray() {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 SchedulePaint(); 439 SchedulePaint();
439 } 440 }
440 441
441 void SystemTray::OnWidgetClosing(views::Widget* widget) { 442 void SystemTray::OnWidgetClosing(views::Widget* widget) {
442 CHECK_EQ(popup_, widget); 443 CHECK_EQ(popup_, widget);
443 popup_ = NULL; 444 popup_ = NULL;
444 bubble_ = NULL; 445 bubble_ = NULL;
445 } 446 }
446 447
447 } // namespace ash 448 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/power/tray_power_date.cc ('k') | ash/system/tray/tray_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698