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

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

Issue 2778823002: Simplify WindowManager::OnWmSetBounds (Closed)
Patch Set: Update expectations for DragTestInteractive.DragTest Created 3 years, 9 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 | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_tree_client.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_MANAGER_DELEGATE_H_ 5 #ifndef UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 6 #define UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 // Used by clients implementing a window manager. 70 // Used by clients implementing a window manager.
71 // TODO(sky): this should be called WindowManager, but that's rather confusing 71 // TODO(sky): this should be called WindowManager, but that's rather confusing
72 // currently. 72 // currently.
73 class AURA_EXPORT WindowManagerDelegate { 73 class AURA_EXPORT WindowManagerDelegate {
74 public: 74 public:
75 // Called once to give the delegate access to functions only exposed to 75 // Called once to give the delegate access to functions only exposed to
76 // the WindowManager. 76 // the WindowManager.
77 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; 77 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0;
78 78
79 // A client requested the bounds of |window| to change to |bounds|. Return 79 // A client requested the bounds of |window| to change to |bounds|.
80 // true if the bounds are allowed to change. A return value of false 80 virtual void OnWmSetBounds(Window* window, const gfx::Rect& bounds) = 0;
81 // indicates the change is not allowed.
82 // NOTE: This should not change the bounds of |window|. Instead return the
83 // bounds the window should be in |bounds|.
84 virtual bool OnWmSetBounds(Window* window, gfx::Rect* bounds) = 0;
85 81
86 // A client requested the shared property named |name| to change to 82 // A client requested the shared property named |name| to change to
87 // |new_data|. Return true to allow the change to |new_data|, false 83 // |new_data|. Return true to allow the change to |new_data|, false
88 // otherwise. If true is returned the property is set via 84 // otherwise. If true is returned the property is set via
89 // PropertyConverter::SetPropertyFromTransportValue(). 85 // PropertyConverter::SetPropertyFromTransportValue().
90 virtual bool OnWmSetProperty( 86 virtual bool OnWmSetProperty(
91 Window* window, 87 Window* window,
92 const std::string& name, 88 const std::string& name,
93 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; 89 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0;
94 90
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 // window. 179 // window.
184 virtual void OnWmDeactivateWindow(Window* window) = 0; 180 virtual void OnWmDeactivateWindow(Window* window) = 0;
185 181
186 protected: 182 protected:
187 virtual ~WindowManagerDelegate() {} 183 virtual ~WindowManagerDelegate() {}
188 }; 184 };
189 185
190 } // namespace ui 186 } // namespace ui
191 187
192 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_ 188 #endif // UI_AURA_MUS_WINDOW_MANAGER_DELEGATE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_tree.cc ('k') | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698