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

Side by Side Diff: ash/system/palette/palette_tray.cc

Issue 2899253002: chromeos: Rename ash::WmShelf to Shelf (Closed)
Patch Set: rebase Created 3 years, 7 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/system/palette/palette_tray.h ('k') | ash/system/palette/palette_utils.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/palette/palette_tray.h" 5 #include "ash/system/palette/palette_tray.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/resources/grit/ash_resources.h" 8 #include "ash/resources/grit/ash_resources.h"
9 #include "ash/resources/vector_icons/vector_icons.h" 9 #include "ash/resources/vector_icons/vector_icons.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
11 #include "ash/session/session_controller.h" 11 #include "ash/session/session_controller.h"
12 #include "ash/shelf/shelf.h"
12 #include "ash/shelf/shelf_constants.h" 13 #include "ash/shelf/shelf_constants.h"
13 #include "ash/shelf/wm_shelf.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/strings/grit/ash_strings.h" 15 #include "ash/strings/grit/ash_strings.h"
16 #include "ash/system/palette/palette_tool_manager.h" 16 #include "ash/system/palette/palette_tool_manager.h"
17 #include "ash/system/palette/palette_utils.h" 17 #include "ash/system/palette/palette_utils.h"
18 #include "ash/system/tray/system_menu_button.h" 18 #include "ash/system/tray/system_menu_button.h"
19 #include "ash/system/tray/system_tray_controller.h" 19 #include "ash/system/tray/system_tray_controller.h"
20 #include "ash/system/tray/tray_bubble_wrapper.h" 20 #include "ash/system/tray/tray_bubble_wrapper.h"
21 #include "ash/system/tray/tray_constants.h" 21 #include "ash/system/tray/tray_constants.h"
22 #include "ash/system/tray/tray_container.h" 22 #include "ash/system/tray/tray_container.h"
23 #include "ash/system/tray/tray_popup_header_button.h" 23 #include "ash/system/tray/tray_popup_header_button.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // clicked. 130 // clicked.
131 views::View* settings_button_; 131 views::View* settings_button_;
132 views::View* help_button_; 132 views::View* help_button_;
133 PaletteTray* palette_tray_; 133 PaletteTray* palette_tray_;
134 134
135 DISALLOW_COPY_AND_ASSIGN(TitleView); 135 DISALLOW_COPY_AND_ASSIGN(TitleView);
136 }; 136 };
137 137
138 } // namespace 138 } // namespace
139 139
140 PaletteTray::PaletteTray(WmShelf* wm_shelf) 140 PaletteTray::PaletteTray(Shelf* shelf)
141 : TrayBackgroundView(wm_shelf), 141 : TrayBackgroundView(shelf),
142 palette_tool_manager_(new PaletteToolManager(this)), 142 palette_tool_manager_(new PaletteToolManager(this)),
143 scoped_session_observer_(this), 143 scoped_session_observer_(this),
144 weak_factory_(this) { 144 weak_factory_(this) {
145 PaletteTool::RegisterToolInstances(palette_tool_manager_.get()); 145 PaletteTool::RegisterToolInstances(palette_tool_manager_.get());
146 146
147 SetInkDropMode(InkDropMode::ON); 147 SetInkDropMode(InkDropMode::ON);
148 SetLayoutManager(new views::FillLayout()); 148 SetLayoutManager(new views::FillLayout());
149 icon_ = new views::ImageView(); 149 icon_ = new views::ImageView();
150 UpdateTrayIcon(); 150 UpdateTrayIcon();
151 151
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 UpdateIconVisibility(); 396 UpdateIconVisibility();
397 } 397 }
398 } 398 }
399 399
400 void PaletteTray::UpdateIconVisibility() { 400 void PaletteTray::UpdateIconVisibility() {
401 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() && 401 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() &&
402 ShouldShowOnDisplay(this) && IsInUserSession()); 402 ShouldShowOnDisplay(this) && IsInUserSession());
403 } 403 }
404 404
405 } // namespace ash 405 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/palette/palette_tray.h ('k') | ash/system/palette/palette_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698