| OLD | NEW |
| 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/status_area_widget_delegate.h" | 5 #include "ash/system/status_area_widget_delegate.h" |
| 6 | 6 |
| 7 #include "ash/ash_export.h" | 7 #include "ash/ash_export.h" |
| 8 #include "ash/focus_cycler.h" | 8 #include "ash/focus_cycler.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| 11 #include "ash/system/tray/tray_constants.h" |
| 11 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 12 #include "ui/aura/root_window.h" | 13 #include "ui/aura/root_window.h" |
| 13 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 14 #include "ui/gfx/canvas.h" | 15 #include "ui/gfx/canvas.h" |
| 15 #include "ui/gfx/image/image.h" | 16 #include "ui/gfx/image/image.h" |
| 16 #include "ui/views/accessible_pane_view.h" | 17 #include "ui/views/accessible_pane_view.h" |
| 17 #include "ui/views/layout/grid_layout.h" | 18 #include "ui/views/layout/grid_layout.h" |
| 18 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
| 19 | 20 |
| 20 namespace { | |
| 21 | |
| 22 int kTraySpacing = 8; | |
| 23 | |
| 24 } // namespace | |
| 25 | |
| 26 namespace ash { | 21 namespace ash { |
| 27 namespace internal { | 22 namespace internal { |
| 28 | 23 |
| 29 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() | 24 StatusAreaWidgetDelegate::StatusAreaWidgetDelegate() |
| 30 : focus_cycler_for_testing_(NULL), | 25 : focus_cycler_for_testing_(NULL), |
| 31 alignment_(SHELF_ALIGNMENT_BOTTOM) { | 26 alignment_(SHELF_ALIGNMENT_BOTTOM) { |
| 32 } | 27 } |
| 33 | 28 |
| 34 StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() { | 29 StatusAreaWidgetDelegate::~StatusAreaWidgetDelegate() { |
| 35 } | 30 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 UpdateWidgetSize(); | 120 UpdateWidgetSize(); |
| 126 } | 121 } |
| 127 | 122 |
| 128 void StatusAreaWidgetDelegate::UpdateWidgetSize() { | 123 void StatusAreaWidgetDelegate::UpdateWidgetSize() { |
| 129 if (GetWidget()) | 124 if (GetWidget()) |
| 130 GetWidget()->SetSize(GetPreferredSize()); | 125 GetWidget()->SetSize(GetPreferredSize()); |
| 131 } | 126 } |
| 132 | 127 |
| 133 } // namespace internal | 128 } // namespace internal |
| 134 } // namespace ash | 129 } // namespace ash |
| OLD | NEW |