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

Side by Side Diff: chrome/browser/views/blocked_popup_container_view_views.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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/browser/views/blocked_popup_container_view_views.h" 5 #include "chrome/browser/views/blocked_popup_container_view_views.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <windows.h> 9 #include <windows.h>
10 #endif 10 #endif
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 SetPosition(); 563 SetPosition();
564 } 564 }
565 565
566 void BlockedPopupContainerViewViews::UpdateWidgetShape( 566 void BlockedPopupContainerViewViews::UpdateWidgetShape(
567 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) { 567 BlockedPopupContainerViewWidget* widget, const gfx::Size& size) {
568 // Set the shape so we have rounded corners on the top. 568 // Set the shape so we have rounded corners on the top.
569 SkRect rect; 569 SkRect rect;
570 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height())); 570 rect.set(0, 0, SkIntToScalar(size.width()), SkIntToScalar(size.height()));
571 gfx::Path path; 571 gfx::Path path;
572 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); 572 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction);
573 widget->SetShape(path); 573 widget->SetShape(path.CreateNativeRegion());
574 } 574 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698