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

Unified Diff: chrome/browser/ui/views/dropdown_bar_host.cc

Issue 6040002: Remove more 'using' declarations of Scoped* from scoped_handle_win.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix linux_view and linux_chromeos Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/tabs/dock_info_win.cc ('k') | chrome/browser/ui/views/status_icons/status_icon_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/dropdown_bar_host.cc
diff --git a/chrome/browser/ui/views/dropdown_bar_host.cc b/chrome/browser/ui/views/dropdown_bar_host.cc
index f3367d2faddf54175e6f7afa89f3bdbd4194d5fb..9e9ab9956d717da52d4676c9fbbd60556daaddb7 100644
--- a/chrome/browser/ui/views/dropdown_bar_host.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host.cc
@@ -6,7 +6,6 @@
#include "app/keyboard_codes.h"
#include "app/slide_animation.h"
-#include "base/scoped_handle.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/dropdown_bar_view.h"
@@ -17,7 +16,9 @@
#include "views/focus/view_storage.h"
#include "views/widget/widget.h"
-#if defined(OS_LINUX)
+#if defined(OS_WIN)
+#include "base/win/scoped_gdi_object.h"
+#elif defined(OS_LINUX)
#include "app/scoped_handle_gtk.h"
#endif
@@ -212,8 +213,11 @@ void DropdownBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) {
// We then create the polygon and use SetWindowRgn to force the window to draw
// only within that area. This region may get reduced in size below.
Path path(polygon, arraysize(polygon));
+#if defined(OS_WIN)
brettw 2010/12/29 20:40:34 All of these new ifdefs in this file are disappoin
tfarina 2010/12/29 20:58:06 Done. PTAL!
+ base::win::ScopedRegion region(path.CreateNativeRegion());
+#elif defined(OS_LINUX)
ScopedRegion region(path.CreateNativeRegion());
-
+#endif
// Are we animating?
if (animation_offset() > 0) {
// The animation happens in two steps: First, we clip the window and then in
@@ -231,7 +235,13 @@ void DropdownBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) {
SkRect animation_rect = { SkIntToScalar(0), SkIntToScalar(y),
SkIntToScalar(max_x), SkIntToScalar(max_y) };
animation_path.addRect(animation_rect);
- ScopedRegion animation_region(animation_path.CreateNativeRegion());
+#if defined(OS_WIN)
+ base::win::ScopedRegion animation_region(
+ animation_path.CreateNativeRegion());
+#elif defined(OS_LINUX)
+ ScopedRegion animation_region(
+ animation_path.CreateNativeRegion());
+#endif
region.Set(Path::IntersectRegions(animation_region.Get(), region.Get()));
// Next, we need to increase the region a little bit to account for the
@@ -246,7 +256,11 @@ void DropdownBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) {
// Combine the region for the curve on the left with our main region.
Path left_path(left_curve, arraysize(left_curve));
+#if defined(OS_WIN)
+ base::win::ScopedRegion r(left_path.CreateNativeRegion());
+#elif defined(OS_LINUX)
ScopedRegion r(left_path.CreateNativeRegion());
+#endif
region.Set(Path::CombineRegions(r.Get(), region.Get()));
// Combine the region for the curve on the right with our main region.
@@ -284,7 +298,11 @@ void DropdownBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) {
// Subtract this region from the original region.
gfx::Path exclude_path(exclude, arraysize(exclude));
+#if defined(OS_WIN)
+ base::win::ScopedRegion exclude_region(exclude_path.CreateNativeRegion());
+#elif defined(OS_LINUX)
ScopedRegion exclude_region(exclude_path.CreateNativeRegion());
+#endif
region.Set(Path::SubtractRegion(region.Get(), exclude_region.Get()));
}
« no previous file with comments | « chrome/browser/ui/tabs/dock_info_win.cc ('k') | chrome/browser/ui/views/status_icons/status_icon_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698