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

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 bool to void. 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 public: 69 public:
70 // Called once to give the delegate access to functions only exposed to 70 // Called once to give the delegate access to functions only exposed to
71 // the WindowManager. 71 // the WindowManager.
72 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0; 72 virtual void SetWindowManagerClient(WindowManagerClient* client) = 0;
73 73
74 // A client requested the bounds of |window| to change to |bounds|. Return 74 // A client requested the bounds of |window| to change to |bounds|. Return
75 // true if the bounds are allowed to change. A return value of false 75 // true if the bounds are allowed to change. A return value of false
76 // indicates the change is not allowed. 76 // indicates the change is not allowed.
77 // NOTE: This should not change the bounds of |window|. Instead return the 77 // NOTE: This should not change the bounds of |window|. Instead return the
78 // bounds the window should be in |bounds|. 78 // bounds the window should be in |bounds|.
79 virtual bool OnWmSetBounds(Window* window, gfx::Rect* bounds) = 0; 79 virtual void OnWmSetBounds(Window* window, gfx::Rect* bounds) = 0;
80 80
81 // A client requested the shared property named |name| to change to 81 // A client requested the shared property named |name| to change to
82 // |new_data|. Return true to allow the change to |new_data|, false 82 // |new_data|. Return true to allow the change to |new_data|, false
83 // otherwise. 83 // otherwise.
84 virtual bool OnWmSetProperty( 84 virtual bool OnWmSetProperty(
85 Window* window, 85 Window* window,
86 const std::string& name, 86 const std::string& name,
87 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0; 87 std::unique_ptr<std::vector<uint8_t>>* new_data) = 0;
88 88
89 // A client has requested a new top level window. The delegate should create 89 // 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
122 122
123 virtual void OnWmCancelMoveLoop(Window* window) = 0; 123 virtual void OnWmCancelMoveLoop(Window* window) = 0;
124 124
125 protected: 125 protected:
126 virtual ~WindowManagerDelegate() {} 126 virtual ~WindowManagerDelegate() {}
127 }; 127 };
128 128
129 } // namespace ui 129 } // namespace ui
130 130
131 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_ 131 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_MANAGER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698