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

Side by Side Diff: ash/common/system/tray/tray_item_more.cc

Issue 2330403002: Do not activate system tray bubble by default (Closed)
Patch Set: Do not activate system tray bubble Created 4 years, 3 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 "ash/common/system/tray/tray_item_more.h" 5 #include "ash/common/system/tray/tray_item_more.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/system/tray/fixed_sized_image_view.h" 8 #include "ash/common/system/tray/fixed_sized_image_view.h"
9 #include "ash/common/system/tray/system_tray_item.h" 9 #include "ash/common/system/tray/system_tray_item.h"
10 #include "ash/common/system/tray/tray_constants.h" 10 #include "ash/common/system/tray/tray_constants.h"
11 #include "ash/common/system/tray/tray_popup_item_style.h" 11 #include "ash/common/system/tray/tray_popup_item_style.h"
12 #include "ash/resources/vector_icons/vector_icons.h" 12 #include "ash/resources/vector_icons/vector_icons.h"
13 #include "grit/ash_resources.h" 13 #include "grit/ash_resources.h"
14 #include "ui/accessibility/ax_view_state.h" 14 #include "ui/accessibility/ax_view_state.h"
15 #include "ui/base/resource/resource_bundle.h" 15 #include "ui/base/resource/resource_bundle.h"
16 #include "ui/gfx/image/image.h" 16 #include "ui/gfx/image/image.h"
17 #include "ui/gfx/paint_vector_icon.h" 17 #include "ui/gfx/paint_vector_icon.h"
18 #include "ui/views/controls/image_view.h" 18 #include "ui/views/controls/image_view.h"
19 #include "ui/views/controls/label.h" 19 #include "ui/views/controls/label.h"
20 #include "ui/views/layout/box_layout.h" 20 #include "ui/views/layout/box_layout.h"
21 21
22 namespace ash { 22 namespace ash {
23 23
24 TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more) 24 TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more)
25 : owner_(owner), 25 : ActionableView(owner),
26 show_more_(show_more), 26 show_more_(show_more),
27 icon_(nullptr), 27 icon_(nullptr),
28 label_(nullptr), 28 label_(nullptr),
29 more_(nullptr) { 29 more_(nullptr) {
30 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 30 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
31 kTrayPopupPaddingHorizontal, 0, 31 kTrayPopupPaddingHorizontal, 0,
32 kTrayPopupPaddingBetweenItems)); 32 kTrayPopupPaddingBetweenItems));
33 33
34 icon_ = new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT)); 34 icon_ = new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT));
35 AddChildView(icon_); 35 AddChildView(icon_);
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 if (!accessible_name_.empty()) 115 if (!accessible_name_.empty())
116 state->name = accessible_name_; 116 state->name = accessible_name_;
117 } 117 }
118 118
119 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { 119 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) {
120 ActionableView::OnNativeThemeChanged(theme); 120 ActionableView::OnNativeThemeChanged(theme);
121 UpdateStyle(); 121 UpdateStyle();
122 } 122 }
123 123
124 } // namespace ash 124 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698