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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_root_window_host_win.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
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | 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/views/widget/desktop_aura/desktop_root_window_host_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_root_window_host_win.h"
6 6
7 #include "base/win/metro.h" 7 #include "base/win/metro.h"
8 #include "third_party/skia/include/core/SkPath.h" 8 #include "third_party/skia/include/core/SkPath.h"
9 #include "third_party/skia/include/core/SkRegion.h" 9 #include "third_party/skia/include/core/SkRegion.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 426
427 void DesktopRootWindowHostWin::ToggleFullScreen() { 427 void DesktopRootWindowHostWin::ToggleFullScreen() {
428 SetWindowTransparency(); 428 SetWindowTransparency();
429 } 429 }
430 430
431 // GetBounds and SetBounds work in pixel coordinates, whereas other get/set 431 // GetBounds and SetBounds work in pixel coordinates, whereas other get/set
432 // methods work in DIP. 432 // methods work in DIP.
433 433
434 gfx::Rect DesktopRootWindowHostWin::GetBounds() const { 434 gfx::Rect DesktopRootWindowHostWin::GetBounds() const {
435 // Match the logic in HWNDMessageHandler::ClientAreaSizeChanged(). 435 // Match the logic in HWNDMessageHandler::ClientAreaSizeChanged().
436 if (IsMinimized())
437 return gfx::Rect();
436 gfx::Rect bounds(WidgetSizeIsClientSize() ? 438 gfx::Rect bounds(WidgetSizeIsClientSize() ?
437 message_handler_->GetClientAreaBoundsInScreen() : 439 message_handler_->GetClientAreaBoundsInScreen() :
438 message_handler_->GetWindowBoundsInScreen()); 440 message_handler_->GetWindowBoundsInScreen());
439 441
440 // If the window bounds were expanded we need to return the original bounds 442 // If the window bounds were expanded we need to return the original bounds
441 // To achieve this we do the reverse of the expansion, i.e. add the 443 // To achieve this we do the reverse of the expansion, i.e. add the
442 // window_expansion_top_left_delta_ to the origin and subtract the 444 // window_expansion_top_left_delta_ to the origin and subtract the
443 // window_expansion_bottom_right_delta_ from the width and height. 445 // window_expansion_bottom_right_delta_ from the width and height.
444 gfx::Rect without_expansion( 446 gfx::Rect without_expansion(
445 bounds.x() + window_expansion_top_left_delta_.x(), 447 bounds.x() + window_expansion_top_left_delta_.x(),
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 954
953 // static 955 // static
954 DesktopRootWindowHost* DesktopRootWindowHost::Create( 956 DesktopRootWindowHost* DesktopRootWindowHost::Create(
955 internal::NativeWidgetDelegate* native_widget_delegate, 957 internal::NativeWidgetDelegate* native_widget_delegate,
956 DesktopNativeWidgetAura* desktop_native_widget_aura) { 958 DesktopNativeWidgetAura* desktop_native_widget_aura) {
957 return new DesktopRootWindowHostWin(native_widget_delegate, 959 return new DesktopRootWindowHostWin(native_widget_delegate,
958 desktop_native_widget_aura); 960 desktop_native_widget_aura);
959 } 961 }
960 962
961 } // namespace views 963 } // namespace views
OLDNEW
« no previous file with comments | « ui/aura/root_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698