| 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_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ | 5 #ifndef UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ |
| 6 #define UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ | 6 #define UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void Minimize() override; | 59 void Minimize() override; |
| 60 void Restore() override; | 60 void Restore() override; |
| 61 void SetCursor(ui::PlatformCursor cursor) override; | 61 void SetCursor(ui::PlatformCursor cursor) override; |
| 62 void MoveCursorTo(const gfx::Point& location) override; | 62 void MoveCursorTo(const gfx::Point& location) override; |
| 63 void ConfineCursorToBounds(const gfx::Rect& bounds) override; | 63 void ConfineCursorToBounds(const gfx::Rect& bounds) override; |
| 64 ui::PlatformImeController* GetPlatformImeController() override; | 64 ui::PlatformImeController* GetPlatformImeController() override; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 friend class PlatformWindowMusTest; | 67 friend class PlatformWindowMusTest; |
| 68 | 68 |
| 69 void SetShowState(mus::mojom::ShowState show_state); | |
| 70 | |
| 71 // mus::WindowObserver: | 69 // mus::WindowObserver: |
| 72 void OnWindowDestroyed(mus::Window* window) override; | 70 void OnWindowDestroyed(mus::Window* window) override; |
| 73 void OnWindowFocusChanged(mus::Window* gained_focus, | 71 void OnWindowFocusChanged(mus::Window* gained_focus, |
| 74 mus::Window* lost_focus) override; | 72 mus::Window* lost_focus) override; |
| 75 void OnWindowPredefinedCursorChanged(mus::Window* window, | 73 void OnWindowPredefinedCursorChanged(mus::Window* window, |
| 76 mus::mojom::Cursor cursor) override; | 74 mus::mojom::Cursor cursor) override; |
| 77 void OnWindowSharedPropertyChanged( | |
| 78 mus::Window* window, | |
| 79 const std::string& name, | |
| 80 const std::vector<uint8_t>* old_data, | |
| 81 const std::vector<uint8_t>* new_data) override; | |
| 82 void OnRequestClose(mus::Window* window) override; | 75 void OnRequestClose(mus::Window* window) override; |
| 83 | 76 |
| 84 // mus::InputEventHandler: | 77 // mus::InputEventHandler: |
| 85 void OnWindowInputEvent( | 78 void OnWindowInputEvent( |
| 86 mus::Window* view, | 79 mus::Window* view, |
| 87 const ui::Event& event, | 80 const ui::Event& event, |
| 88 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* | 81 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* |
| 89 ack_callback) override; | 82 ack_callback) override; |
| 90 | 83 |
| 91 ui::PlatformWindowDelegate* delegate_; | 84 ui::PlatformWindowDelegate* delegate_; |
| 92 mus::Window* mus_window_; | 85 mus::Window* mus_window_; |
| 93 mus::mojom::ShowState show_state_; | |
| 94 mus::mojom::Cursor last_cursor_; | 86 mus::mojom::Cursor last_cursor_; |
| 95 | 87 |
| 96 // True if OnWindowDestroyed() has been received. | 88 // True if OnWindowDestroyed() has been received. |
| 97 bool mus_window_destroyed_; | 89 bool mus_window_destroyed_; |
| 98 | 90 |
| 99 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; | 91 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; |
| 100 std::unique_ptr<ui::ViewProp> prop_; | 92 std::unique_ptr<ui::ViewProp> prop_; |
| 101 #ifndef NDEBUG | 93 #ifndef NDEBUG |
| 102 std::unique_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_; | 94 std::unique_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_; |
| 103 #endif | 95 #endif |
| 104 | 96 |
| 105 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus); | 97 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus); |
| 106 }; | 98 }; |
| 107 | 99 |
| 108 } // namespace views | 100 } // namespace views |
| 109 | 101 |
| 110 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ | 102 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ |
| OLD | NEW |