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

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

Issue 2814243002: Removes a couple more functions from WmWindow (Closed)
Patch Set: feedback Created 3 years, 8 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/shelf/shelf_layout_manager.cc ('k') | ash/system/status_area_widget.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 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/shelf/shelf_widget.h" 5 #include "ash/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/focus_cycler.h" 8 #include "ash/focus_cycler.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/session/session_controller.h" 10 #include "ash/session/session_controller.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 background_animator_.AddObserver(delegate_view_); 141 background_animator_.AddObserver(delegate_view_);
142 142
143 views::Widget::InitParams params( 143 views::Widget::InitParams params(
144 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); 144 views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
145 params.name = "ShelfWidget"; 145 params.name = "ShelfWidget";
146 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 146 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
147 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 147 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
148 params.delegate = delegate_view_; 148 params.delegate = delegate_view_;
149 shelf_container->GetRootWindowController() 149 shelf_container->GetRootWindowController()
150 ->ConfigureWidgetInitParamsForContainer( 150 ->ConfigureWidgetInitParamsForContainer(
151 this, shelf_container->GetShellWindowId(), &params); 151 this, shelf_container->aura_window()->id(), &params);
152 Init(params); 152 Init(params);
153 153
154 // The shelf should not take focus when initially shown. 154 // The shelf should not take focus when initially shown.
155 set_focus_on_creation(false); 155 set_focus_on_creation(false);
156 SetContentsView(delegate_view_); 156 SetContentsView(delegate_view_);
157 delegate_view_->SetParentLayer(GetLayer()); 157 delegate_view_->SetParentLayer(GetLayer());
158 158
159 shelf_layout_manager_ = new ShelfLayoutManager(this, wm_shelf_); 159 shelf_layout_manager_ = new ShelfLayoutManager(this, wm_shelf_);
160 shelf_layout_manager_->AddObserver(this); 160 shelf_layout_manager_->AddObserver(this);
161 shelf_container->SetLayoutManager(base::WrapUnique(shelf_layout_manager_)); 161 shelf_container->SetLayoutManager(base::WrapUnique(shelf_layout_manager_));
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 if (shelf_view_) 351 if (shelf_view_)
352 shelf_view_->UpdateShelfItemBackground(color); 352 shelf_view_->UpdateShelfItemBackground(color);
353 } 353 }
354 354
355 void ShelfWidget::WillDeleteShelfLayoutManager() { 355 void ShelfWidget::WillDeleteShelfLayoutManager() {
356 shelf_layout_manager_->RemoveObserver(this); 356 shelf_layout_manager_->RemoveObserver(this);
357 shelf_layout_manager_ = nullptr; 357 shelf_layout_manager_ = nullptr;
358 } 358 }
359 359
360 } // namespace ash 360 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/system/status_area_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698