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

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

Issue 1405373005: views/mus: Move PlatformWindowMus into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mus-example-focus-close
Patch Set: tot.merge Created 5 years, 1 month 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/BUILD.gn ('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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_
6 #define UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "components/mus/public/cpp/window_observer.h"
13 #include "ui/platform_window/platform_window.h"
14
15 namespace views {
16
17 class PlatformWindowMus : public ui::PlatformWindow,
18 public mus::WindowObserver {
19 public:
20 PlatformWindowMus(ui::PlatformWindowDelegate* delegate,
21 mus::Window* mus_window);
22 ~PlatformWindowMus() override;
23
24 private:
25 void SetShowState(mus::mojom::ShowState show_state);
26
27 // ui::PlatformWindow:
28 void Show() override;
29 void Hide() override;
30 void Close() override;
31
32 void SetBounds(const gfx::Rect& bounds) override;
33 gfx::Rect GetBounds() override;
34 void SetTitle(const base::string16& title) override;
35 void SetCapture() override;
36 void ReleaseCapture() override;
37 void ToggleFullscreen() override;
38 void Maximize() override;
39 void Minimize() override;
40 void Restore() override;
41 void SetCursor(ui::PlatformCursor cursor) override;
42 void MoveCursorTo(const gfx::Point& location) override;
43 void ConfineCursorToBounds(const gfx::Rect& bounds) override;
44 ui::PlatformImeController* GetPlatformImeController() override;
45
46 // mus::WindowObserver:
47 void OnWindowDestroyed(mus::Window* window) override;
48 void OnWindowBoundsChanged(mus::Window* window,
49 const gfx::Rect& old_bounds,
50 const gfx::Rect& new_bounds) override;
51 void OnWindowFocusChanged(mus::Window* gained_focus,
52 mus::Window* lost_focus) override;
53 void OnWindowInputEvent(mus::Window* view,
54 const mus::mojom::EventPtr& event) override;
55 void OnWindowSharedPropertyChanged(
56 mus::Window* window,
57 const std::string& name,
58 const std::vector<uint8_t>* old_data,
59 const std::vector<uint8_t>* new_data) override;
60
61 ui::PlatformWindowDelegate* delegate_;
62 mus::Window* mus_window_;
63 mus::mojom::ShowState show_state_;
64
65 DISALLOW_COPY_AND_ASSIGN(PlatformWindowMus);
66 };
67
68 } // namespace views
69
70 #endif // UI_VIEWS_MUS_PLATFORM_WINDOW_MUS_H_
OLDNEW
« no previous file with comments | « ui/views/mus/BUILD.gn ('k') | ui/views/mus/platform_window_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698