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

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

Issue 87383002: Fix autofill popup size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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/root_window.h" 5 #include "ui/aura/root_window.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 822
823 DispatchDetails details = DispatchHeldEvents(); 823 DispatchDetails details = DispatchHeldEvents();
824 if (details.dispatcher_destroyed) 824 if (details.dispatcher_destroyed)
825 return; 825 return;
826 // The compositor should have the same size as the native root window host. 826 // The compositor should have the same size as the native root window host.
827 // Get the latest scale from display because it might have been changed. 827 // Get the latest scale from display because it might have been changed.
828 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), size); 828 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), size);
829 829
830 // The layer, and the observers should be notified of the 830 // The layer, and the observers should be notified of the
831 // transformed size of the root window. 831 // transformed size of the root window.
832 UpdateRootWindowSize(size); 832 UpdateRootWindowSize(host_->GetBounds().size());
833 FOR_EACH_OBSERVER(RootWindowObserver, observers_, 833 FOR_EACH_OBSERVER(RootWindowObserver, observers_,
834 OnRootWindowHostResized(this)); 834 OnRootWindowHostResized(this));
835 } 835 }
836 836
837 float RootWindow::GetDeviceScaleFactor() { 837 float RootWindow::GetDeviceScaleFactor() {
838 return compositor()->device_scale_factor(); 838 return compositor()->device_scale_factor();
839 } 839 }
840 840
841 RootWindow* RootWindow::AsRootWindow() { 841 RootWindow* RootWindow::AsRootWindow() {
842 return this; 842 return this;
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1125 }
1126 1126
1127 gfx::Transform RootWindow::GetInverseRootTransform() const { 1127 gfx::Transform RootWindow::GetInverseRootTransform() const {
1128 float scale = ui::GetDeviceScaleFactor(window()->layer()); 1128 float scale = ui::GetDeviceScaleFactor(window()->layer());
1129 gfx::Transform transform; 1129 gfx::Transform transform;
1130 transform.Scale(1.0f / scale, 1.0f / scale); 1130 transform.Scale(1.0f / scale, 1.0f / scale);
1131 return transformer_->GetInverseTransform() * transform; 1131 return transformer_->GetInverseTransform() * transform;
1132 } 1132 }
1133 1133
1134 } // namespace aura 1134 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/remote_root_window_host_win.cc ('k') | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698