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

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

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/default_container_event_filter.h" 5 #include "ash/wm/default_container_event_filter.h"
6 6
7 #include "ash/wm/default_container_layout_manager.h" 7 #include "ash/wm/default_container_layout_manager.h"
8 #include "ash/wm/window_frame.h" 8 #include "ash/wm/window_frame.h"
9 #include "ash/wm/window_util.h" 9 #include "ash/wm/window_util.h"
10 #include "ui/aura/event.h" 10 #include "ui/aura/event.h"
11 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
12 #include "ui/base/hit_test.h" 12 #include "ui/base/hit_test.h"
13 13
14 namespace { 14 namespace {
15 15
16 // Sends OnWindowHoveredChanged(|hovered|) to the WindowFrame for |window|, 16 // Sends OnWindowHoveredChanged(|hovered|) to the WindowFrame for |window|,
17 // which may be NULL. 17 // which may be NULL.
18 void WindowHoverChanged(aura::Window* window, bool hovered) { 18 void WindowHoverChanged(aura::Window* window, bool hovered) {
19 if (!window) 19 if (!window)
20 return; 20 return;
21 aura_shell::WindowFrame* window_frame = 21 ash::WindowFrame* window_frame =
22 static_cast<aura_shell::WindowFrame*>( 22 static_cast<ash::WindowFrame*>(
23 window->GetProperty(aura_shell::kWindowFrameKey)); 23 window->GetProperty(ash::kWindowFrameKey));
24 if (!window_frame) 24 if (!window_frame)
25 return; 25 return;
26 window_frame->OnWindowHoverChanged(hovered); 26 window_frame->OnWindowHoverChanged(hovered);
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 namespace aura_shell { 31 namespace ash {
32 namespace internal { 32 namespace internal {
33 33
34 DefaultContainerEventFilter::DefaultContainerEventFilter(aura::Window* owner) 34 DefaultContainerEventFilter::DefaultContainerEventFilter(aura::Window* owner)
35 : ToplevelWindowEventFilter(owner), 35 : ToplevelWindowEventFilter(owner),
36 drag_state_(DRAG_NONE), 36 drag_state_(DRAG_NONE),
37 hovered_window_(NULL) { 37 hovered_window_(NULL) {
38 } 38 }
39 39
40 DefaultContainerEventFilter::~DefaultContainerEventFilter() { 40 DefaultContainerEventFilter::~DefaultContainerEventFilter() {
41 } 41 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 120
121 void DefaultContainerEventFilter::UpdateHoveredWindow( 121 void DefaultContainerEventFilter::UpdateHoveredWindow(
122 aura::Window* toplevel_window) { 122 aura::Window* toplevel_window) {
123 if (toplevel_window == hovered_window_) 123 if (toplevel_window == hovered_window_)
124 return; 124 return;
125 WindowHoverChanged(hovered_window_, false); 125 WindowHoverChanged(hovered_window_, false);
126 hovered_window_ = toplevel_window; 126 hovered_window_ = toplevel_window;
127 WindowHoverChanged(hovered_window_, true); 127 WindowHoverChanged(hovered_window_, true);
128 } 128 }
129 129
130 } // internal 130 } // namespace internal
131 } // aura_shell 131 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698