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

Side by Side Diff: ash/common/shelf/shelf_widget.cc

Issue 2738133003: Promotes a handful of members from WmShell to Shell (Closed)
Patch Set: merge Created 3 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/shelf/shelf_widget.h" 5 #include "ash/common/shelf/shelf_widget.h"
6 6
7 #include "ash/animation/animation_change_type.h" 7 #include "ash/animation/animation_change_type.h"
8 #include "ash/common/focus_cycler.h" 8 #include "ash/common/focus_cycler.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shelf/app_list_button.h" 10 #include "ash/common/shelf/app_list_button.h"
11 #include "ash/common/shelf/shelf_background_animator_observer.h" 11 #include "ash/common/shelf/shelf_background_animator_observer.h"
12 #include "ash/common/shelf/shelf_constants.h" 12 #include "ash/common/shelf/shelf_constants.h"
13 #include "ash/common/shelf/shelf_delegate.h" 13 #include "ash/common/shelf/shelf_delegate.h"
14 #include "ash/common/shelf/shelf_layout_manager.h" 14 #include "ash/common/shelf/shelf_layout_manager.h"
15 #include "ash/common/shelf/shelf_view.h" 15 #include "ash/common/shelf/shelf_view.h"
16 #include "ash/common/shelf/wm_shelf.h" 16 #include "ash/common/shelf/wm_shelf.h"
17 #include "ash/common/shelf/wm_shelf_util.h" 17 #include "ash/common/shelf/wm_shelf_util.h"
18 #include "ash/common/system/status_area_layout_manager.h" 18 #include "ash/common/system/status_area_layout_manager.h"
19 #include "ash/common/system/status_area_widget.h" 19 #include "ash/common/system/status_area_widget.h"
20 #include "ash/common/wm_shell.h" 20 #include "ash/common/wm_shell.h"
21 #include "ash/common/wm_window.h" 21 #include "ash/common/wm_window.h"
22 #include "ash/root_window_controller.h" 22 #include "ash/root_window_controller.h"
23 #include "ash/shell.h"
23 #include "ash/wm/window_properties.h" 24 #include "ash/wm/window_properties.h"
24 #include "base/memory/ptr_util.h" 25 #include "base/memory/ptr_util.h"
25 #include "ui/compositor/layer.h" 26 #include "ui/compositor/layer.h"
26 #include "ui/compositor/scoped_layer_animation_settings.h" 27 #include "ui/compositor/scoped_layer_animation_settings.h"
27 #include "ui/gfx/skbitmap_operations.h" 28 #include "ui/gfx/skbitmap_operations.h"
28 #include "ui/views/accessible_pane_view.h" 29 #include "ui/views/accessible_pane_view.h"
29 #include "ui/views/layout/fill_layout.h" 30 #include "ui/views/layout/fill_layout.h"
30 #include "ui/views/widget/widget.h" 31 #include "ui/views/widget/widget.h"
31 #include "ui/views/widget/widget_delegate.h" 32 #include "ui/views/widget/widget_delegate.h"
32 33
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 opaque_background_.SetColor(color); 128 opaque_background_.SetColor(color);
128 } 129 }
129 130
130 ShelfWidget::ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf) 131 ShelfWidget::ShelfWidget(WmWindow* shelf_container, WmShelf* wm_shelf)
131 : wm_shelf_(wm_shelf), 132 : wm_shelf_(wm_shelf),
132 status_area_widget_(nullptr), 133 status_area_widget_(nullptr),
133 delegate_view_(new DelegateView(this)), 134 delegate_view_(new DelegateView(this)),
134 shelf_view_(nullptr), 135 shelf_view_(nullptr),
135 background_animator_(SHELF_BACKGROUND_DEFAULT, 136 background_animator_(SHELF_BACKGROUND_DEFAULT,
136 wm_shelf_, 137 wm_shelf_,
137 WmShell::Get()->wallpaper_controller()), 138 Shell::GetInstance()->wallpaper_controller()),
138 activating_as_fallback_(false) { 139 activating_as_fallback_(false) {
139 DCHECK(wm_shelf_); 140 DCHECK(wm_shelf_);
140 background_animator_.AddObserver(this); 141 background_animator_.AddObserver(this);
141 background_animator_.AddObserver(delegate_view_); 142 background_animator_.AddObserver(delegate_view_);
142 143
143 views::Widget::InitParams params( 144 views::Widget::InitParams params(
144 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 145 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
145 params.name = "ShelfWidget"; 146 params.name = "ShelfWidget";
146 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 147 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
147 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 148 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 if (shelf_view_) 350 if (shelf_view_)
350 shelf_view_->UpdateShelfItemBackground(color); 351 shelf_view_->UpdateShelfItemBackground(color);
351 } 352 }
352 353
353 void ShelfWidget::WillDeleteShelfLayoutManager() { 354 void ShelfWidget::WillDeleteShelfLayoutManager() {
354 shelf_layout_manager_->RemoveObserver(this); 355 shelf_layout_manager_->RemoveObserver(this);
355 shelf_layout_manager_ = nullptr; 356 shelf_layout_manager_ = nullptr;
356 } 357 }
357 358
358 } // namespace ash 359 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/chromeos/ime_menu/ime_menu_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698