OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 } |
OLD | NEW |