Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ |
| 6 #define UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 36 gfx::Rect GetBounds() const override; | 36 gfx::Rect GetBounds() const override; |
| 37 void SetBounds(const gfx::Rect& bounds) override; | 37 void SetBounds(const gfx::Rect& bounds) override; |
| 38 gfx::Point GetLocationOnNativeScreen() const override; | 38 gfx::Point GetLocationOnNativeScreen() const override; |
| 39 void SetCapture() override; | 39 void SetCapture() override; |
| 40 void ReleaseCapture() override; | 40 void ReleaseCapture() override; |
| 41 void SetCursorNative(gfx::NativeCursor cursor) override; | 41 void SetCursorNative(gfx::NativeCursor cursor) override; |
| 42 void MoveCursorToNative(const gfx::Point& location) override; | 42 void MoveCursorToNative(const gfx::Point& location) override; |
| 43 void OnCursorVisibilityChangedNative(bool show) override; | 43 void OnCursorVisibilityChangedNative(bool show) override; |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 // NOTE: neither of these calls CreateCompositor(); subclasses must call | |
| 47 // CreateCompositor() at the appropriate time. | |
|
sadrul
2016/11/16 18:02:08
Is this change because the creation of the composi
sky
2016/11/16 18:45:49
CreateCompositor() calls window->Init(). window->I
| |
| 46 WindowTreeHostPlatform(); | 48 WindowTreeHostPlatform(); |
| 47 explicit WindowTreeHostPlatform(std::unique_ptr<WindowPort> window_port); | 49 explicit WindowTreeHostPlatform(std::unique_ptr<WindowPort> window_port); |
| 48 | 50 |
| 49 void SetPlatformWindow(std::unique_ptr<ui::PlatformWindow> window); | 51 void SetPlatformWindow(std::unique_ptr<ui::PlatformWindow> window); |
| 50 ui::PlatformWindow* platform_window() { return window_.get(); } | 52 ui::PlatformWindow* platform_window() { return window_.get(); } |
| 51 | 53 |
| 52 // ui::PlatformWindowDelegate: | 54 // ui::PlatformWindowDelegate: |
| 53 void OnBoundsChanged(const gfx::Rect& new_bounds) override; | 55 void OnBoundsChanged(const gfx::Rect& new_bounds) override; |
| 54 void OnDamageRect(const gfx::Rect& damaged_region) override; | 56 void OnDamageRect(const gfx::Rect& damaged_region) override; |
| 55 void DispatchEvent(ui::Event* event) override; | 57 void DispatchEvent(ui::Event* event) override; |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 67 std::unique_ptr<ui::PlatformWindow> window_; | 69 std::unique_ptr<ui::PlatformWindow> window_; |
| 68 gfx::NativeCursor current_cursor_; | 70 gfx::NativeCursor current_cursor_; |
| 69 gfx::Rect bounds_; | 71 gfx::Rect bounds_; |
| 70 | 72 |
| 71 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform); | 73 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform); |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 } // namespace aura | 76 } // namespace aura |
| 75 | 77 |
| 76 #endif // UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ | 78 #endif // UI_AURA_WINDOW_TREE_HOST_PLATFORM_H_ |
| OLD | NEW |