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

Side by Side Diff: ui/aura/window.cc

Issue 2654413002: Stretching NativeViewHost, and misc tab capture fixes.
Patch Set: Gettin' it all working on ui/cocoa and MacViews too. 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/window.h ('k') | ui/compositor/layer.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (screen_position_client) { 248 if (screen_position_client) {
249 gfx::Point origin = bounds.origin(); 249 gfx::Point origin = bounds.origin();
250 screen_position_client->ConvertPointToScreen(root, &origin); 250 screen_position_client->ConvertPointToScreen(root, &origin);
251 bounds.set_origin(origin); 251 bounds.set_origin(origin);
252 } 252 }
253 } 253 }
254 return bounds; 254 return bounds;
255 } 255 }
256 256
257 void Window::SetTransform(const gfx::Transform& transform) { 257 void Window::SetTransform(const gfx::Transform& transform) {
258 if (transform == this->transform())
259 return;
260
258 for (WindowObserver& observer : observers_) 261 for (WindowObserver& observer : observers_)
259 observer.OnWindowTransforming(this); 262 observer.OnWindowTransforming(this);
260 layer()->SetTransform(transform); 263 layer()->SetTransform(transform);
261 for (WindowObserver& observer : observers_) 264 for (WindowObserver& observer : observers_)
262 observer.OnWindowTransformed(this); 265 observer.OnWindowTransformed(this);
263 NotifyAncestorWindowTransformed(this); 266 NotifyAncestorWindowTransformed(this);
264 } 267 }
265 268
266 void Window::SetLayoutManager(LayoutManager* layout_manager) { 269 void Window::SetLayoutManager(LayoutManager* layout_manager) {
267 if (layout_manager == layout_manager_.get()) 270 if (layout_manager == layout_manager_.get())
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 layer_name = "Unnamed Window"; 1088 layer_name = "Unnamed Window";
1086 1089
1087 if (id_ != -1) 1090 if (id_ != -1)
1088 layer_name += " " + base::IntToString(id_); 1091 layer_name += " " + base::IntToString(id_);
1089 1092
1090 layer()->set_name(layer_name); 1093 layer()->set_name(layer_name);
1091 #endif 1094 #endif
1092 } 1095 }
1093 1096
1094 } // namespace aura 1097 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/window.h ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698