| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 5 #ifndef ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 6 #define ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
| 9 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 10 #include "base/memory/scoped_ptr.h" | |
| 11 | 12 |
| 12 namespace aura { | 13 namespace aura { |
| 13 class Window; | 14 class Window; |
| 14 class WindowTreeHost; | 15 class WindowTreeHost; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace gfx { | 18 namespace gfx { |
| 18 class Insets; | 19 class Insets; |
| 19 class Rect; | 20 class Rect; |
| 20 } | 21 } |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 56 |
| 56 // Clips the cursor to the bounds of the root window until UnConfineCursor(). | 57 // Clips the cursor to the bounds of the root window until UnConfineCursor(). |
| 57 // We would like to be able to confine the cursor to that window. However, | 58 // We would like to be able to confine the cursor to that window. However, |
| 58 // currently, we do not have such functionality in X. So we just confine | 59 // currently, we do not have such functionality in X. So we just confine |
| 59 // to the root window. This is ok because this option is currently only | 60 // to the root window. This is ok because this option is currently only |
| 60 // being used in fullscreen mode, so root_window bounds = window bounds. | 61 // being used in fullscreen mode, so root_window bounds = window bounds. |
| 61 virtual bool ConfineCursorToRootWindow() = 0; | 62 virtual bool ConfineCursorToRootWindow() = 0; |
| 62 virtual void UnConfineCursor() = 0; | 63 virtual void UnConfineCursor() = 0; |
| 63 | 64 |
| 64 virtual void SetRootWindowTransformer( | 65 virtual void SetRootWindowTransformer( |
| 65 scoped_ptr<RootWindowTransformer> transformer) = 0; | 66 std::unique_ptr<RootWindowTransformer> transformer) = 0; |
| 66 | 67 |
| 67 virtual gfx::Insets GetHostInsets() const = 0; | 68 virtual gfx::Insets GetHostInsets() const = 0; |
| 68 | 69 |
| 69 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0; | 70 virtual aura::WindowTreeHost* AsWindowTreeHost() = 0; |
| 70 | 71 |
| 71 // Stop listening for events in preparation for shutdown. | 72 // Stop listening for events in preparation for shutdown. |
| 72 virtual void PrepareForShutdown() {} | 73 virtual void PrepareForShutdown() {} |
| 73 | 74 |
| 74 virtual void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) {} | 75 virtual void RegisterMirroringHost(AshWindowTreeHost* mirroring_ash_host) {} |
| 75 | 76 |
| 76 protected: | 77 protected: |
| 77 // Translates the native mouse location into screen coordinates. | 78 // Translates the native mouse location into screen coordinates. |
| 78 void TranslateLocatedEvent(ui::LocatedEvent* event); | 79 void TranslateLocatedEvent(ui::LocatedEvent* event); |
| 79 | 80 |
| 80 private: | 81 private: |
| 81 InputMethodEventHandler* input_method_handler_; | 82 InputMethodEventHandler* input_method_handler_; |
| 82 }; | 83 }; |
| 83 | 84 |
| 84 } // namespace ash | 85 } // namespace ash |
| 85 | 86 |
| 86 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ | 87 #endif // ASH_HOST_ASH_WINDOW_TREE_HOST_H_ |
| OLD | NEW |