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

Side by Side Diff: ash/wm/drag_window_controller.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. 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/test/ash_test_base.cc ('k') | ash/wm/immersive_context_ash.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 (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/wm/drag_window_controller.h" 5 #include "ash/wm/drag_window_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/public/cpp/shell_window_ids.h" 9 #include "ash/public/cpp/shell_window_ids.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 19 matching lines...) Expand all
30 #include "ui/wm/core/window_util.h" 30 #include "ui/wm/core/window_util.h"
31 31
32 namespace ash { 32 namespace ash {
33 33
34 // This keeps track of the drag window's state. It creates/destroys/updates 34 // This keeps track of the drag window's state. It creates/destroys/updates
35 // bounds and opacity based on the current bounds. 35 // bounds and opacity based on the current bounds.
36 class DragWindowController::DragWindowDetails : public aura::WindowDelegate { 36 class DragWindowController::DragWindowDetails : public aura::WindowDelegate {
37 public: 37 public:
38 DragWindowDetails(const display::Display& display, 38 DragWindowDetails(const display::Display& display,
39 aura::Window* original_window) 39 aura::Window* original_window)
40 : root_window_(ShellPort::Get() 40 : root_window_(
41 ->GetRootWindowForDisplayId(display.id()) 41 ShellPort::Get()->GetRootWindowForDisplayId(display.id())) {}
42 ->aura_window()) {}
43 42
44 ~DragWindowDetails() override { 43 ~DragWindowDetails() override {
45 delete drag_window_; 44 delete drag_window_;
46 DCHECK(!drag_window_); 45 DCHECK(!drag_window_);
47 } 46 }
48 47
49 void Update(aura::Window* original_window, 48 void Update(aura::Window* original_window,
50 const gfx::Rect& bounds_in_screen, 49 const gfx::Rect& bounds_in_screen,
51 const gfx::Point& drag_location_in_screen) { 50 const gfx::Point& drag_location_in_screen) {
52 gfx::Rect root_bounds_in_screen = root_window_->GetBoundsInScreen(); 51 gfx::Rect root_bounds_in_screen = root_window_->GetBoundsInScreen();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 layers.pop_back(); 244 layers.pop_back();
246 if (layer->delegate()) 245 if (layer->delegate())
247 layer->delegate()->OnPaintLayer(context); 246 layer->delegate()->OnPaintLayer(context);
248 for (auto* child : layer->children()) 247 for (auto* child : layer->children())
249 layers.push_back(child); 248 layers.push_back(child);
250 } 249 }
251 } 250 }
252 } 251 }
253 252
254 } // namespace ash 253 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_base.cc ('k') | ash/wm/immersive_context_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698