| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "components/mus/public/cpp/input_event_handler.h" | 14 #include "components/mus/public/cpp/input_event_handler.h" |
| 15 #include "components/mus/public/cpp/window_observer.h" | 15 #include "components/mus/public/cpp/window_observer.h" |
| 16 #include "ui/platform_window/platform_window.h" | 16 #include "ui/platform_window/platform_window.h" |
| 17 #include "ui/views/mus/mus_export.h" | 17 #include "ui/views/mus/mus_export.h" |
| 18 | 18 |
| 19 namespace bitmap_uploader { | 19 namespace bitmap_uploader { |
| 20 class BitmapUploader; | 20 class BitmapUploader; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace mojo { | 23 namespace mojo { |
| 24 class Connector; | 24 class Connector; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace ui { | 27 namespace ui { |
| 28 class Event; |
| 28 class ViewProp; | 29 class ViewProp; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace views { | 32 namespace views { |
| 32 | 33 |
| 33 class VIEWS_MUS_EXPORT PlatformWindowMus | 34 class VIEWS_MUS_EXPORT PlatformWindowMus |
| 34 : public NON_EXPORTED_BASE(ui::PlatformWindow), | 35 : public NON_EXPORTED_BASE(ui::PlatformWindow), |
| 35 public mus::WindowObserver, | 36 public mus::WindowObserver, |
| 36 public NON_EXPORTED_BASE(mus::InputEventHandler) { | 37 public NON_EXPORTED_BASE(mus::InputEventHandler) { |
| 37 public: | 38 public: |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void OnWindowSharedPropertyChanged( | 78 void OnWindowSharedPropertyChanged( |
| 78 mus::Window* window, | 79 mus::Window* window, |
| 79 const std::string& name, | 80 const std::string& name, |
| 80 const std::vector<uint8_t>* old_data, | 81 const std::vector<uint8_t>* old_data, |
| 81 const std::vector<uint8_t>* new_data) override; | 82 const std::vector<uint8_t>* new_data) override; |
| 82 void OnRequestClose(mus::Window* window) override; | 83 void OnRequestClose(mus::Window* window) override; |
| 83 | 84 |
| 84 // mus::InputEventHandler: | 85 // mus::InputEventHandler: |
| 85 void OnWindowInputEvent( | 86 void OnWindowInputEvent( |
| 86 mus::Window* view, | 87 mus::Window* view, |
| 87 mus::mojom::EventPtr event, | 88 const ui::Event& event, |
| 88 scoped_ptr<base::Callback<void(bool)>>* ack_callback) override; | 89 scoped_ptr<base::Callback<void(bool)>>* ack_callback) override; |
| 89 | 90 |
| 90 ui::PlatformWindowDelegate* delegate_; | 91 ui::PlatformWindowDelegate* delegate_; |
| 91 mus::Window* mus_window_; | 92 mus::Window* mus_window_; |
| 92 mus::mojom::ShowState show_state_; | 93 mus::mojom::ShowState show_state_; |
| 93 mus::mojom::Cursor last_cursor_; | 94 mus::mojom::Cursor last_cursor_; |
| 94 | 95 |
| 95 // True if OnWindowDestroyed() has been received. | 96 // True if OnWindowDestroyed() has been received. |
| 96 bool mus_window_destroyed_; | 97 bool mus_window_destroyed_; |
| 97 | 98 |
| 98 scoped_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; | 99 scoped_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; |
| 99 scoped_ptr<ui::ViewProp> prop_; | 100 scoped_ptr<ui::ViewProp> prop_; |
| 100 #ifndef NDEBUG | 101 #ifndef NDEBUG |
| 101 scoped_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_; | 102 scoped_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_; |
| 102 #endif | 103 #endif |
| 103 | 104 |
| 104 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus); | 105 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus); |
| 105 }; | 106 }; |
| 106 | 107 |
| 107 } // namespace views | 108 } // namespace views |
| 108 | 109 |
| 109 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ | 110 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ |
| OLD | NEW |