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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip_unittest.cc

Issue 361083004: Tab and TabCloseButton should implement MaskedTargeterDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: re-upload Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip_unittest.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
index 88976eca5eadc7b85623f5c0bb8a6f02150e2d10..afdd9dcad94e186c0d2807de7639c050f6b21c10 100644
--- a/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip_unittest.cc
@@ -17,6 +17,7 @@
#include "ui/gfx/skia_util.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/view.h"
+#include "ui/views/view_targeter.h"
#include "ui/views/widget/widget.h"
namespace {
@@ -126,8 +127,15 @@ class TabStripTest : public views::ViewsTestBase {
// Returns the rectangular hit test region of |tab| in |tab|'s local
// coordinate space.
gfx::Rect GetTabHitTestMask(Tab* tab) {
+ views::ViewTargeter* targeter = tab->targeter();
+ DCHECK(targeter);
+ views::MaskedTargeterDelegate* delegate =
+ static_cast<views::MaskedTargeterDelegate*>(tab);
+
gfx::Path mask;
- tab->GetHitTestMaskDeprecated(views::View::HIT_TEST_SOURCE_TOUCH, &mask);
+ bool valid_mask = delegate->GetHitTestMask(&mask);
+ DCHECK(valid_mask);
+
return gfx::ToEnclosingRect((gfx::SkRectToRectF(mask.getBounds())));
}
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698