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: views/window/window_win.cc

Issue 340077: Gets find bar animation/clipping to work on views/gtk. (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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/window/window_win.h" 5 #include "views/window/window_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "app/gfx/canvas_paint.h" 10 #include "app/gfx/canvas_paint.h"
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1348 MONITORINFO mi; 1348 MONITORINFO mi;
1349 mi.cbSize = sizeof mi; 1349 mi.cbSize = sizeof mi;
1350 GetMonitorInfo(monitor, &mi); 1350 GetMonitorInfo(monitor, &mi);
1351 CRect work_rect = mi.rcWork; 1351 CRect work_rect = mi.rcWork;
1352 work_rect.OffsetRect(-window_rect.left, -window_rect.top); 1352 work_rect.OffsetRect(-window_rect.left, -window_rect.top);
1353 new_region = CreateRectRgnIndirect(&work_rect); 1353 new_region = CreateRectRgnIndirect(&work_rect);
1354 } else { 1354 } else {
1355 gfx::Path window_mask; 1355 gfx::Path window_mask;
1356 non_client_view_->GetWindowMask( 1356 non_client_view_->GetWindowMask(
1357 gfx::Size(window_rect.Width(), window_rect.Height()), &window_mask); 1357 gfx::Size(window_rect.Width(), window_rect.Height()), &window_mask);
1358 new_region = window_mask.CreateHRGN(); 1358 new_region = window_mask.CreateNativeRegion();
1359 } 1359 }
1360 1360
1361 if (current_rgn_result == ERROR || !EqualRgn(current_rgn, new_region)) { 1361 if (current_rgn_result == ERROR || !EqualRgn(current_rgn, new_region)) {
1362 // SetWindowRgn takes ownership of the HRGN created by CreateHRGN. 1362 // SetWindowRgn takes ownership of the HRGN created by CreateNativeRegion.
1363 SetWindowRgn(new_region, TRUE); 1363 SetWindowRgn(new_region, TRUE);
1364 } else { 1364 } else {
1365 DeleteObject(new_region); 1365 DeleteObject(new_region);
1366 } 1366 }
1367 1367
1368 DeleteObject(current_rgn); 1368 DeleteObject(current_rgn);
1369 } 1369 }
1370 1370
1371 void WindowWin::ProcessNCMousePress(const CPoint& point, int flags) { 1371 void WindowWin::ProcessNCMousePress(const CPoint& point, int flags) {
1372 CPoint temp = point; 1372 CPoint temp = point;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 Window::CloseSecondaryWidget(root_view->GetWidget()); 1435 Window::CloseSecondaryWidget(root_view->GetWidget());
1436 return TRUE; 1436 return TRUE;
1437 } 1437 }
1438 } // namespace 1438 } // namespace
1439 1439
1440 void Window::CloseAllSecondaryWindows() { 1440 void Window::CloseAllSecondaryWindows() {
1441 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0); 1441 EnumThreadWindows(GetCurrentThreadId(), WindowCallbackProc, 0);
1442 } 1442 }
1443 1443
1444 } // namespace views 1444 } // namespace views
OLDNEW
« chrome/browser/views/find_bar_host.cc ('K') | « views/window/window_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698