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

Side by Side Diff: ui/views/controls/native/native_view_host_win.cc

Issue 24299004: Implement features in NativeViewHostAura for scroll end effect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Responded to sky's comments and added some testing Created 7 years, 2 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
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/controls/native/native_view_host_win.h" 5 #include "ui/views/controls/native/native_view_host_win.h"
6 6
7 #include <oleacc.h> 7 #include <oleacc.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/base/win/hidden_window.h" 10 #include "ui/base/win/hidden_window.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 SWP_NOCOPYBITS | 91 SWP_NOCOPYBITS |
92 SWP_NOOWNERZORDER | 92 SWP_NOOWNERZORDER |
93 SWP_NOZORDER; 93 SWP_NOZORDER;
94 gfx::Rect bounds = gfx::win::DIPToScreenRect(gfx::Rect(x,y,w,h)); 94 gfx::Rect bounds = gfx::win::DIPToScreenRect(gfx::Rect(x,y,w,h));
95 95
96 // Only send the SHOWWINDOW flag if we're invisible, to avoid flashing. 96 // Only send the SHOWWINDOW flag if we're invisible, to avoid flashing.
97 if (!IsWindowVisible(host_->native_view())) 97 if (!IsWindowVisible(host_->native_view()))
98 swp_flags = (swp_flags | SWP_SHOWWINDOW) & ~SWP_NOREDRAW; 98 swp_flags = (swp_flags | SWP_SHOWWINDOW) & ~SWP_NOREDRAW;
99 99
100 if (host_->fast_resize()) { 100 if (host_->fast_resize()) {
101 // TODO: Implement support for gravity.
sky 2013/09/26 22:10:54 Nuke this. This class should be dead once aura is
rharrison 2013/09/30 20:48:45 Done.
101 // In a fast resize, we move the window and clip it with SetWindowRgn. 102 // In a fast resize, we move the window and clip it with SetWindowRgn.
102 RECT win_rect; 103 RECT win_rect;
103 GetWindowRect(host_->native_view(), &win_rect); 104 GetWindowRect(host_->native_view(), &win_rect);
104 gfx::Rect rect(win_rect); 105 gfx::Rect rect(win_rect);
105 SetWindowPos(host_->native_view(), 0, bounds.x(), bounds.y(), 106 SetWindowPos(host_->native_view(), 0, bounds.x(), bounds.y(),
106 rect.width(), rect.height(), 107 rect.width(), rect.height(),
107 swp_flags); 108 swp_flags);
108 109
109 InstallClip(0, 0, bounds.width(), bounds.height()); 110 InstallClip(0, 0, bounds.width(), bounds.height());
110 } else { 111 } else {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 //////////////////////////////////////////////////////////////////////////////// 149 ////////////////////////////////////////////////////////////////////////////////
149 // NativeViewHostWrapper, public: 150 // NativeViewHostWrapper, public:
150 151
151 // static 152 // static
152 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( 153 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper(
153 NativeViewHost* host) { 154 NativeViewHost* host) {
154 return new NativeViewHostWin(host); 155 return new NativeViewHostWin(host);
155 } 156 }
156 157
157 } // namespace views 158 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698