| OLD | NEW |
| 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/root_window_controller.h" | 5 #include "ash/root_window_controller.h" |
| 6 | 6 |
| 7 #include <queue> | 7 #include <queue> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 } | 209 } |
| 210 | 210 |
| 211 // A window delegate which does nothing. Used to create a window that | 211 // A window delegate which does nothing. Used to create a window that |
| 212 // is a event target, but do nothing. | 212 // is a event target, but do nothing. |
| 213 class EmptyWindowDelegate : public aura::WindowDelegate { | 213 class EmptyWindowDelegate : public aura::WindowDelegate { |
| 214 public: | 214 public: |
| 215 EmptyWindowDelegate() {} | 215 EmptyWindowDelegate() {} |
| 216 virtual ~EmptyWindowDelegate() {} | 216 virtual ~EmptyWindowDelegate() {} |
| 217 | 217 |
| 218 // aura::WindowDelegate overrides: | 218 // aura::WindowDelegate overrides: |
| 219 virtual gfx::Size GetMinimumSize() const OVERRIDE { | 219 virtual gfx::Size GetMinimumSize() const override { |
| 220 return gfx::Size(); | 220 return gfx::Size(); |
| 221 } | 221 } |
| 222 virtual gfx::Size GetMaximumSize() const OVERRIDE { | 222 virtual gfx::Size GetMaximumSize() const override { |
| 223 return gfx::Size(); | 223 return gfx::Size(); |
| 224 } | 224 } |
| 225 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, | 225 virtual void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 226 const gfx::Rect& new_bounds) OVERRIDE { | 226 const gfx::Rect& new_bounds) override { |
| 227 } | 227 } |
| 228 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) OVERRIDE { | 228 virtual gfx::NativeCursor GetCursor(const gfx::Point& point) override { |
| 229 return gfx::kNullCursor; | 229 return gfx::kNullCursor; |
| 230 } | 230 } |
| 231 virtual int GetNonClientComponent( | 231 virtual int GetNonClientComponent( |
| 232 const gfx::Point& point) const OVERRIDE { | 232 const gfx::Point& point) const override { |
| 233 return HTNOWHERE; | 233 return HTNOWHERE; |
| 234 } | 234 } |
| 235 virtual bool ShouldDescendIntoChildForEventHandling( | 235 virtual bool ShouldDescendIntoChildForEventHandling( |
| 236 aura::Window* child, | 236 aura::Window* child, |
| 237 const gfx::Point& location) OVERRIDE { | 237 const gfx::Point& location) override { |
| 238 return false; | 238 return false; |
| 239 } | 239 } |
| 240 virtual bool CanFocus() OVERRIDE { | 240 virtual bool CanFocus() override { |
| 241 return false; | 241 return false; |
| 242 } | 242 } |
| 243 virtual void OnCaptureLost() OVERRIDE { | 243 virtual void OnCaptureLost() override { |
| 244 } | 244 } |
| 245 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { | 245 virtual void OnPaint(gfx::Canvas* canvas) override { |
| 246 } | 246 } |
| 247 virtual void OnDeviceScaleFactorChanged( | 247 virtual void OnDeviceScaleFactorChanged( |
| 248 float device_scale_factor) OVERRIDE { | 248 float device_scale_factor) override { |
| 249 } | 249 } |
| 250 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {} | 250 virtual void OnWindowDestroying(aura::Window* window) override {} |
| 251 virtual void OnWindowDestroyed(aura::Window* window) OVERRIDE { | 251 virtual void OnWindowDestroyed(aura::Window* window) override { |
| 252 delete this; | 252 delete this; |
| 253 } | 253 } |
| 254 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE { | 254 virtual void OnWindowTargetVisibilityChanged(bool visible) override { |
| 255 } | 255 } |
| 256 virtual bool HasHitTestMask() const OVERRIDE { | 256 virtual bool HasHitTestMask() const override { |
| 257 return false; | 257 return false; |
| 258 } | 258 } |
| 259 virtual void GetHitTestMask(gfx::Path* mask) const OVERRIDE {} | 259 virtual void GetHitTestMask(gfx::Path* mask) const override {} |
| 260 | 260 |
| 261 private: | 261 private: |
| 262 DISALLOW_COPY_AND_ASSIGN(EmptyWindowDelegate); | 262 DISALLOW_COPY_AND_ASSIGN(EmptyWindowDelegate); |
| 263 }; | 263 }; |
| 264 | 264 |
| 265 } // namespace | 265 } // namespace |
| 266 | 266 |
| 267 void RootWindowController::CreateForPrimaryDisplay(AshWindowTreeHost* host) { | 267 void RootWindowController::CreateForPrimaryDisplay(AshWindowTreeHost* host) { |
| 268 RootWindowController* controller = new RootWindowController(host); | 268 RootWindowController* controller = new RootWindowController(host); |
| 269 controller->Init(RootWindowController::PRIMARY, | 269 controller->Init(RootWindowController::PRIMARY, |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 else | 1068 else |
| 1069 DisableTouchHudProjection(); | 1069 DisableTouchHudProjection(); |
| 1070 } | 1070 } |
| 1071 | 1071 |
| 1072 RootWindowController* GetRootWindowController( | 1072 RootWindowController* GetRootWindowController( |
| 1073 const aura::Window* root_window) { | 1073 const aura::Window* root_window) { |
| 1074 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; | 1074 return root_window ? GetRootWindowSettings(root_window)->controller : NULL; |
| 1075 } | 1075 } |
| 1076 | 1076 |
| 1077 } // namespace ash | 1077 } // namespace ash |
| OLD | NEW |