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

Side by Side Diff: services/ui/public/cpp/window_manager_delegate.h

Issue 2548513002: Update bool WindowManager::OnWmSetBounds() to match with its desirable behavior. (Closed)
Patch Set: Change gfx::Rect* to const gfx::Rect&. Created 4 years 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
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 SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_ 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_ 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Used by clients implementing a window manager. 64 // Used by clients implementing a window manager.
65 // TODO(sky): this should be called WindowManager, but that's rather confusing 65 // TODO(sky): this should be called WindowManager, but that's rather confusing
66 // currently. 66 // currently.
67 class WindowManagerDelegate { 67 class WindowManagerDelegate {
68 public: 68 public:
69 // Called once to give the delegate access to functions only exposed to 69 // Called once to give the delegate access to functions only exposed to
70 // the WindowManager. 70 // the WindowManager.
71 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; 71 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0;
72 72
73 // A client requested the bounds of |window| to change to |bounds|. Return 73 // A client requested the bounds of |window| to change to |bounds|. Return
mfomitchev 2016/12/07 20:59:46 Please update the comment
thanhph 2016/12/08 00:20:29 Done.
74 // true if the bounds are allowed to change. A return value of false 74 // true if the bounds are allowed to change. A return value of false
75 // indicates the change is not allowed. 75 // indicates the change is not allowed.
76 // NOTE: This should not change the bounds of |window|. Instead return the 76 // NOTE: This should not change the bounds of |window|. Instead return the
77 // bounds the window should be in |bounds|. 77 // bounds the window should be in |bounds|.
78 virtual bool OnWmSetBounds(Window* window, gfx::Rect* bounds) = 0; 78 virtual void OnWmSetBounds(Window* window, const gfx::Rect& bounds) = 0;
79 79
80 // A client requested the shared property named |name| to change to 80 // A client requested the shared property named |name| to change to
81 // |new_data|. Return true to allow the change to |new_data|, false 81 // |new_data|. Return true to allow the change to |new_data|, false
82 // otherwise. 82 // otherwise.
83 virtual bool OnWmSetProperty( 83 virtual bool OnWmSetProperty(
84 Window* window, 84 Window* window,
85 const std::string& name, 85 const std::string& name,
86 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; 86 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0;
87 87
88 // A client has requested a new top level window. The delegate should create 88 // A client has requested a new top level window. The delegate should create
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 virtual void OnWmCancelMoveLoop(Window* window) = 0; 122 virtual void OnWmCancelMoveLoop(Window* window) = 0;
123 123
124 protected: 124 protected:
125 virtual ~WindowManagerDelegate() {} 125 virtual ~WindowManagerDelegate() {}
126 }; 126 };
127 127
128 } // namespace ui 128 } // namespace ui
129 129
130 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_ 130 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698