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

Side by Side Diff: ui/aura/mus/window_tree_host_mus.h

Issue 2657003004: aura-mus: Hook up PerformWindowMove(). (Closed)
Patch Set: Fold PerformWindowMove and CancelWindowMove. Created 3 years, 10 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/aura/mus/window_tree_client.cc ('k') | ui/aura/mus/window_tree_host_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_AURA_MUS_WINDOW_TREE_HOST_MUS_H_ 5 #ifndef UI_AURA_MUS_WINDOW_TREE_HOST_MUS_H_
6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_H_ 6 #define UI_AURA_MUS_WINDOW_TREE_HOST_MUS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "services/service_manager/public/cpp/connector.h" 16 #include "services/service_manager/public/cpp/connector.h"
17 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
17 #include "ui/aura/aura_export.h" 18 #include "ui/aura/aura_export.h"
18 #include "ui/aura/window_tree_host_platform.h" 19 #include "ui/aura/window_tree_host_platform.h"
19 20
20 namespace display { 21 namespace display {
21 class Display; 22 class Display;
22 } 23 }
23 24
24 namespace aura { 25 namespace aura {
25 26
26 class InputMethodMus; 27 class InputMethodMus;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void DeactivateWindow(); 77 void DeactivateWindow();
77 78
78 // Requests that our root window be stacked above this other root window 79 // Requests that our root window be stacked above this other root window
79 // which our connection owns. 80 // which our connection owns.
80 void StackAbove(Window* window); 81 void StackAbove(Window* window);
81 82
82 // Requests that our root window be stacked above all other parallel root 83 // Requests that our root window be stacked above all other parallel root
83 // windows which we might not own. 84 // windows which we might not own.
84 void StackAtTop(); 85 void StackAtTop();
85 86
87 // Tells the window manager to take control of moving the window. Returns
88 // true if the move wasn't canceled.
89 void PerformWindowMove(ui::mojom::MoveLoopSource mus_source,
90 const gfx::Point& cursor_location,
91 const base::Callback<void(bool)>& callback);
92
93 // Tells the window manager to abort any current move initiated by
94 // PerformWindowMove().
95 void CancelWindowMove();
96
86 // Intended only for WindowTreeClient to call. 97 // Intended only for WindowTreeClient to call.
87 void set_display_id(int64_t id) { display_id_ = id; } 98 void set_display_id(int64_t id) { display_id_ = id; }
88 int64_t display_id() const { return display_id_; } 99 int64_t display_id() const { return display_id_; }
89 display::Display GetDisplay() const; 100 display::Display GetDisplay() const;
90 101
91 // aura::WindowTreeHostPlatform: 102 // aura::WindowTreeHostPlatform:
92 void HideImpl() override; 103 void HideImpl() override;
93 void SetBoundsInPixels(const gfx::Rect& bounds) override; 104 void SetBoundsInPixels(const gfx::Rect& bounds) override;
94 void DispatchEvent(ui::Event* event) override; 105 void DispatchEvent(ui::Event* event) override;
95 void OnClosed() override; 106 void OnClosed() override;
96 void OnActivationChanged(bool active) override; 107 void OnActivationChanged(bool active) override;
97 void OnCloseRequest() override; 108 void OnCloseRequest() override;
98 gfx::ICCProfile GetICCProfileForCurrentDisplay() override; 109 gfx::ICCProfile GetICCProfileForCurrentDisplay() override;
99 110
100 private: 111 private:
101 int64_t display_id_; 112 int64_t display_id_;
102 113
103 WindowTreeHostMusDelegate* delegate_; 114 WindowTreeHostMusDelegate* delegate_;
104 115
105 bool in_set_bounds_from_server_ = false; 116 bool in_set_bounds_from_server_ = false;
106 117
107 std::unique_ptr<InputMethodMus> input_method_; 118 std::unique_ptr<InputMethodMus> input_method_;
108 119
109 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMus); 120 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostMus);
110 }; 121 };
111 122
112 } // namespace aura 123 } // namespace aura
113 124
114 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_H_ 125 #endif // UI_AURA_MUS_WINDOW_TREE_HOST_MUS_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_tree_client.cc ('k') | ui/aura/mus/window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698