Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: ui/views/mus/platform_window_mus.h

Issue 1975873002: Move remaining mus::WindowObserver lifecycle callbacks from PlatformWindowMus to NativeWidgetMus::M… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/mus/native_widget_mus.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 17 matching lines...) Expand all
28 class Event; 28 class Event;
29 class ViewProp; 29 class ViewProp;
30 } 30 }
31 31
32 namespace views { 32 namespace views {
33 33
34 // This class has been marked for deletion. Its implementation is being rolled 34 // This class has been marked for deletion. Its implementation is being rolled
35 // into views::NativeWidgetMus. See crbug.com/609555 for details. 35 // into views::NativeWidgetMus. See crbug.com/609555 for details.
36 class VIEWS_MUS_EXPORT PlatformWindowMus 36 class VIEWS_MUS_EXPORT PlatformWindowMus
37 : public NON_EXPORTED_BASE(ui::PlatformWindow), 37 : public NON_EXPORTED_BASE(ui::PlatformWindow),
38 public mus::WindowObserver,
39 public NON_EXPORTED_BASE(mus::InputEventHandler) { 38 public NON_EXPORTED_BASE(mus::InputEventHandler) {
40 public: 39 public:
41 PlatformWindowMus(ui::PlatformWindowDelegate* delegate, 40 PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
42 shell::Connector* connector, 41 shell::Connector* connector,
43 mus::Window* mus_window); 42 mus::Window* mus_window);
44 ~PlatformWindowMus() override; 43 ~PlatformWindowMus() override;
45 44
46 // ui::PlatformWindow: 45 // ui::PlatformWindow:
47 void Show() override; 46 void Show() override;
48 void Hide() override; 47 void Hide() override;
49 void Close() override; 48 void Close() override;
50 void SetBounds(const gfx::Rect& bounds) override; 49 void SetBounds(const gfx::Rect& bounds) override;
51 gfx::Rect GetBounds() override; 50 gfx::Rect GetBounds() override;
52 void SetTitle(const base::string16& title) override; 51 void SetTitle(const base::string16& title) override;
53 void SetCapture() override; 52 void SetCapture() override;
54 void ReleaseCapture() override; 53 void ReleaseCapture() override;
55 void ToggleFullscreen() override; 54 void ToggleFullscreen() override;
56 void Maximize() override; 55 void Maximize() override;
57 void Minimize() override; 56 void Minimize() override;
58 void Restore() override; 57 void Restore() override;
59 void SetCursor(ui::PlatformCursor cursor) override; 58 void SetCursor(ui::PlatformCursor cursor) override;
60 void MoveCursorTo(const gfx::Point& location) override; 59 void MoveCursorTo(const gfx::Point& location) override;
61 void ConfineCursorToBounds(const gfx::Rect& bounds) override; 60 void ConfineCursorToBounds(const gfx::Rect& bounds) override;
62 ui::PlatformImeController* GetPlatformImeController() override; 61 ui::PlatformImeController* GetPlatformImeController() override;
63 62
64 private: 63 private:
65 friend class PlatformWindowMusTest; 64 friend class PlatformWindowMusTest;
66 65
67 // mus::WindowObserver:
68 void OnWindowDestroyed(mus::Window* window) override;
69 void OnWindowFocusChanged(mus::Window* gained_focus,
70 mus::Window* lost_focus) override;
71 void OnRequestClose(mus::Window* window) override;
72
73 // mus::InputEventHandler: 66 // mus::InputEventHandler:
74 void OnWindowInputEvent( 67 void OnWindowInputEvent(
75 mus::Window* view, 68 mus::Window* view,
76 const ui::Event& event, 69 const ui::Event& event,
77 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>* 70 std::unique_ptr<base::Callback<void(mus::mojom::EventResult)>>*
78 ack_callback) override; 71 ack_callback) override;
79 72
80 ui::PlatformWindowDelegate* delegate_; 73 ui::PlatformWindowDelegate* delegate_;
81 mus::Window* mus_window_; 74 mus::Window* mus_window_;
82 75
83 // True if OnWindowDestroyed() has been received. 76 // True if OnWindowDestroyed() has been received.
84 bool mus_window_destroyed_; 77 bool mus_window_destroyed_;
85 78
86 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_; 79 std::unique_ptr<bitmap_uploader::BitmapUploader> bitmap_uploader_;
87 std::unique_ptr<ui::ViewProp> prop_; 80 std::unique_ptr<ui::ViewProp> prop_;
88 #ifndef NDEBUG 81 #ifndef NDEBUG
89 std::unique_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_; 82 std::unique_ptr<base::WeakPtrFactory<PlatformWindowMus>> weak_factory_;
90 #endif 83 #endif
91 84
92 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus); 85 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus);
93 }; 86 };
94 87
95 } // namespace views 88 } // namespace views
96 89
97 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_ 90 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_
OLDNEW
« no previous file with comments | « ui/views/mus/native_widget_mus.cc ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698