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

Side by Side Diff: views/widget/widget_win.cc

Issue 342116: Attempt 2 at:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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 | « views/widget/widget_win.h ('k') | views/window/window_gtk.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "views/widget/widget_win.h" 5 #include "views/widget/widget_win.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/native_theme_win.h" 8 #include "app/gfx/native_theme_win.h"
9 #include "app/gfx/path.h" 9 #include "app/gfx/path.h"
10 #include "app/l10n_util_win.h" 10 #include "app/l10n_util_win.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 SWP_NOACTIVATE | SWP_NOZORDER); 137 SWP_NOACTIVATE | SWP_NOZORDER);
138 } 138 }
139 139
140 void WidgetWin::MoveAbove(Widget* other) { 140 void WidgetWin::MoveAbove(Widget* other) {
141 gfx::Rect bounds; 141 gfx::Rect bounds;
142 GetBounds(&bounds, false); 142 GetBounds(&bounds, false);
143 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(), 143 SetWindowPos(other->GetNativeView(), bounds.x(), bounds.y(),
144 bounds.width(), bounds.height(), SWP_NOACTIVATE); 144 bounds.width(), bounds.height(), SWP_NOACTIVATE);
145 } 145 }
146 146
147 void WidgetWin::SetShape(const gfx::Path& shape) { 147 void WidgetWin::SetShape(gfx::NativeRegion region) {
148 SetWindowRgn(shape.CreateHRGN(), TRUE); 148 SetWindowRgn(region, TRUE);
149 } 149 }
150 150
151 void WidgetWin::Close() { 151 void WidgetWin::Close() {
152 if (!IsWindow()) 152 if (!IsWindow())
153 return; // No need to do anything. 153 return; // No need to do anything.
154 154
155 // Let's hide ourselves right away. 155 // Let's hide ourselves right away.
156 Hide(); 156 Hide();
157 157
158 if (close_widget_factory_.empty()) { 158 if (close_widget_factory_.empty()) {
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 if (root_view) 1178 if (root_view)
1179 return root_view; 1179 return root_view;
1180 1180
1181 // Enumerate all children and check if they have a RootView. 1181 // Enumerate all children and check if they have a RootView.
1182 EnumChildWindows(hwnd, EnumChildProc, reinterpret_cast<LPARAM>(&root_view)); 1182 EnumChildWindows(hwnd, EnumChildProc, reinterpret_cast<LPARAM>(&root_view));
1183 1183
1184 return root_view; 1184 return root_view;
1185 } 1185 }
1186 1186
1187 } // namespace views 1187 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/widget_win.h ('k') | views/window/window_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698