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

Side by Side Diff: ash/aura/wm_window_aura.cc

Issue 2211463002: mash: Move ShelfWindowWatcher[ItemDelegate] to ash/common. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODO comments with bug for WmWindowMus ShelfItemDetails support. Created 4 years, 4 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/aura/wm_window_aura.h ('k') | ash/common/shelf/shelf_window_watcher.h » ('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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 6
7 #include "ash/aura/aura_layout_manager_adapter.h" 7 #include "ash/aura/aura_layout_manager_adapter.h"
8 #include "ash/aura/wm_root_window_controller_aura.h" 8 #include "ash/aura/wm_root_window_controller_aura.h"
9 #include "ash/aura/wm_shell_aura.h" 9 #include "ash/aura/wm_shell_aura.h"
10 #include "ash/common/ash_constants.h" 10 #include "ash/common/ash_constants.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return; 284 return;
285 } 285 }
286 286
287 NOTREACHED(); 287 NOTREACHED();
288 } 288 }
289 289
290 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() { 290 ShelfItemDetails* WmWindowAura::GetShelfItemDetails() {
291 return window_->GetProperty(kShelfItemDetailsKey); 291 return window_->GetProperty(kShelfItemDetailsKey);
292 } 292 }
293 293
294 void WmWindowAura::SetShelfItemDetails(const ShelfItemDetails& details) {
295 // |item_details| is owned by |window_|.
296 ShelfItemDetails* item_details = new ShelfItemDetails(details);
297 window_->SetProperty(kShelfItemDetailsKey, item_details);
298 }
299
300 void WmWindowAura::ClearShelfItemDetails() {
301 window_->ClearProperty(kShelfItemDetailsKey);
302 }
303
294 const wm::WindowState* WmWindowAura::GetWindowState() const { 304 const wm::WindowState* WmWindowAura::GetWindowState() const {
295 return ash::wm::GetWindowState(window_); 305 return ash::wm::GetWindowState(window_);
296 } 306 }
297 307
298 WmWindow* WmWindowAura::GetToplevelWindow() { 308 WmWindow* WmWindowAura::GetToplevelWindow() {
299 return Get(window_->GetToplevelWindow()); 309 return Get(window_->GetToplevelWindow());
300 } 310 }
301 311
302 WmWindow* WmWindowAura::GetToplevelWindowForFocus() { 312 WmWindow* WmWindowAura::GetToplevelWindowForFocus() {
303 return Get(::wm::GetToplevelWindow(window_)); 313 return Get(::wm::GetToplevelWindow(window_));
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 bool visible) { 771 bool visible) {
762 FOR_EACH_OBSERVER(WmWindowObserver, observers_, 772 FOR_EACH_OBSERVER(WmWindowObserver, observers_,
763 OnWindowVisibilityChanged(this, visible)); 773 OnWindowVisibilityChanged(this, visible));
764 } 774 }
765 775
766 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) { 776 void WmWindowAura::OnWindowTitleChanged(aura::Window* window) {
767 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this)); 777 FOR_EACH_OBSERVER(WmWindowObserver, observers_, OnWindowTitleChanged(this));
768 } 778 }
769 779
770 } // namespace ash 780 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_window_aura.h ('k') | ash/common/shelf/shelf_window_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698