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

Side by Side Diff: services/ui/demo/mus_demo.cc

Issue 2548513002: Update bool WindowManager::OnWmSetBounds() to match with its desirable behavior. (Closed)
Patch Set: Remove if condition statetment in Window::SetBounds(const gfx::Rect& new_bounds). 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "services/ui/demo/mus_demo.h" 5 #include "services/ui/demo/mus_demo.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "services/service_manager/public/cpp/connector.h" 9 #include "services/service_manager/public/cpp/connector.h"
10 #include "services/service_manager/public/cpp/service_context.h" 10 #include "services/service_manager/public/cpp/service_context.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 aura::client::CaptureClient* MusDemo::GetCaptureClient() { 126 aura::client::CaptureClient* MusDemo::GetCaptureClient() {
127 return capture_client_.get(); 127 return capture_client_.get();
128 } 128 }
129 129
130 aura::PropertyConverter* MusDemo::GetPropertyConverter() { 130 aura::PropertyConverter* MusDemo::GetPropertyConverter() {
131 return property_converter_.get(); 131 return property_converter_.get();
132 } 132 }
133 133
134 void MusDemo::SetWindowManagerClient(aura::WindowManagerClient* client) {} 134 void MusDemo::SetWindowManagerClient(aura::WindowManagerClient* client) {}
135 135
136 bool MusDemo::OnWmSetBounds(aura::Window* window, gfx::Rect* bounds) { 136 void MusDemo::OnWmSetBounds(aura::Window* window, const gfx::Rect& bounds) {}
137 return true;
138 }
139 137
140 bool MusDemo::OnWmSetProperty(aura::Window* window, 138 bool MusDemo::OnWmSetProperty(aura::Window* window,
141 const std::string& name, 139 const std::string& name,
142 std::unique_ptr<std::vector<uint8_t>>* new_data) { 140 std::unique_ptr<std::vector<uint8_t>>* new_data) {
143 return true; 141 return true;
144 } 142 }
145 143
146 aura::Window* MusDemo::OnWmCreateTopLevelWindow( 144 aura::Window* MusDemo::OnWmCreateTopLevelWindow(
147 mojom::WindowType window_type, 145 mojom::WindowType window_type,
148 std::map<std::string, std::vector<uint8_t>>* properties) { 146 std::map<std::string, std::vector<uint8_t>>* properties) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1); 240 gfx::ImageSkiaRep image_skia_rep(bitmap_, 1);
243 gfx::ImageSkia image_skia(image_skia_rep); 241 gfx::ImageSkia image_skia(image_skia_rep);
244 gfx::Image image(image_skia); 242 gfx::Image image(image_skia);
245 243
246 window_delegate_->SetImage(image); 244 window_delegate_->SetImage(image);
247 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds()); 245 bitmap_window_->SchedulePaintInRect(bitmap_window_->bounds());
248 } 246 }
249 247
250 } // namespace demo 248 } // namespace demo
251 } // namespace aura 249 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698