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

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

Issue 138073004: Fix omnibox height when less than 64 pixels tall. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/widget/desktop_aura/desktop_root_window_host_win.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_tree_host.h" 5 #include "ui/aura/window_tree_host.h"
6 6
7 #include "ui/aura/env.h" 7 #include "ui/aura/env.h"
8 #include "ui/aura/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/root_window_transformer.h" 9 #include "ui/aura/root_window_transformer.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 compositor_.reset(new ui::Compositor(GetAcceleratedWidget())); 174 compositor_.reset(new ui::Compositor(GetAcceleratedWidget()));
175 DCHECK(compositor_.get()); 175 DCHECK(compositor_.get());
176 } 176 }
177 177
178 void WindowTreeHost::NotifyHostResized(const gfx::Size& new_size) { 178 void WindowTreeHost::NotifyHostResized(const gfx::Size& new_size) {
179 // The compositor should have the same size as the native root window host. 179 // The compositor should have the same size as the native root window host.
180 // Get the latest scale from display because it might have been changed. 180 // Get the latest scale from display because it might have been changed.
181 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), 181 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
182 new_size); 182 new_size);
183 183
184 gfx::Size layer_size = GetBounds().size();
184 // The layer, and the observers should be notified of the 185 // The layer, and the observers should be notified of the
185 // transformed size of the root window. 186 // transformed size of the root window.
186 UpdateRootWindowSize(new_size); 187 UpdateRootWindowSize(layer_size);
187 delegate_->OnHostResized(new_size); 188 delegate_->OnHostResized(layer_size);
188 } 189 }
189 190
190 #if defined(OS_ANDROID) 191 #if defined(OS_ANDROID)
191 // static 192 // static
192 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) { 193 WindowTreeHost* WindowTreeHost::Create(const gfx::Rect& bounds) {
193 // This is only hit for tests and ash, right now these aren't an issue so 194 // This is only hit for tests and ash, right now these aren't an issue so
194 // adding the CHECK. 195 // adding the CHECK.
195 // TODO(sky): decide if we want a factory. 196 // TODO(sky): decide if we want a factory.
196 CHECK(false); 197 CHECK(false);
197 return NULL; 198 return NULL;
198 } 199 }
199 #endif 200 #endif
200 201
201 } // namespace aura 202 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | 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