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

Side by Side Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 143803010: Disable Views fuzzing with --disable-views-rect-based-targeting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/tabs/tab.h" 5 #include "chrome/browser/ui/views/tabs/tab.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 398 }
399 399
400 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE { 400 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE {
401 // Consume all gesture events here so that the parent (Tab) does not 401 // Consume all gesture events here so that the parent (Tab) does not
402 // start consuming gestures. 402 // start consuming gestures.
403 ImageButton::OnGestureEvent(event); 403 ImageButton::OnGestureEvent(event);
404 event->SetHandled(); 404 event->SetHandled();
405 } 405 }
406 406
407 virtual bool HasHitTestMask() const OVERRIDE { 407 virtual bool HasHitTestMask() const OVERRIDE {
408 return true; 408 // TODO(tdanderson): Enable this without regressing http://crbug.com/332334
409 return false;
sadrul 2014/01/23 00:40:42 Do this only for defined(OS_WIN)?
msw 2014/01/23 00:54:32 Moot.
409 } 410 }
410 411
411 virtual void GetHitTestMask(HitTestSource source, 412 virtual void GetHitTestMask(HitTestSource source,
412 gfx::Path* path) const OVERRIDE { 413 gfx::Path* path) const OVERRIDE {
413 // Use the button's contents bounds (which does not include padding) 414 // Use the button's contents bounds (which does not include padding)
414 // and the hit test mask of our parent |tab_| to determine if the 415 // and the hit test mask of our parent |tab_| to determine if the
415 // button is hidden behind another tab. 416 // button is hidden behind another tab.
416 gfx::Path tab_mask; 417 gfx::Path tab_mask;
417 tab_->GetHitTestMask(source, &tab_mask); 418 tab_->GetHitTestMask(source, &tab_mask);
418 419
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1764 const gfx::ImageSkia& image) { 1765 const gfx::ImageSkia& image) {
1765 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); 1766 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE);
1766 ImageCacheEntry entry; 1767 ImageCacheEntry entry;
1767 entry.resource_id = resource_id; 1768 entry.resource_id = resource_id;
1768 entry.scale_factor = scale_factor; 1769 entry.scale_factor = scale_factor;
1769 entry.image = image; 1770 entry.image = image;
1770 image_cache_->push_front(entry); 1771 image_cache_->push_front(entry);
1771 if (image_cache_->size() > kMaxImageCacheSize) 1772 if (image_cache_->size() > kMaxImageCacheSize)
1772 image_cache_->pop_back(); 1773 image_cache_->pop_back();
1773 } 1774 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698