| 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 controller()->SelectTab(this); | 942 controller()->SelectTab(this); |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 | 945 |
| 946 void Tab::OnMouseCaptureLost() { | 946 void Tab::OnMouseCaptureLost() { |
| 947 if (controller()) | 947 if (controller()) |
| 948 controller()->EndDrag(END_DRAG_CAPTURE_LOST); | 948 controller()->EndDrag(END_DRAG_CAPTURE_LOST); |
| 949 } | 949 } |
| 950 | 950 |
| 951 void Tab::OnMouseEntered(const ui::MouseEvent& event) { | 951 void Tab::OnMouseEntered(const ui::MouseEvent& event) { |
| 952 hover_controller_.Show(); | 952 hover_controller_.Show(views::GlowHoverController::SUBTLE); |
| 953 } | 953 } |
| 954 | 954 |
| 955 void Tab::OnMouseMoved(const ui::MouseEvent& event) { | 955 void Tab::OnMouseMoved(const ui::MouseEvent& event) { |
| 956 hover_controller_.SetLocation(event.location()); | 956 hover_controller_.SetLocation(event.location()); |
| 957 if (controller()) | 957 if (controller()) |
| 958 controller()->OnMouseEventInTab(this, event); | 958 controller()->OnMouseEventInTab(this, event); |
| 959 } | 959 } |
| 960 | 960 |
| 961 void Tab::OnMouseExited(const ui::MouseEvent& event) { | 961 void Tab::OnMouseExited(const ui::MouseEvent& event) { |
| 962 hover_controller_.Hide(); | 962 hover_controller_.Hide(); |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 const gfx::ImageSkia& image) { | 1637 const gfx::ImageSkia& image) { |
| 1638 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); | 1638 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); |
| 1639 ImageCacheEntry entry; | 1639 ImageCacheEntry entry; |
| 1640 entry.resource_id = resource_id; | 1640 entry.resource_id = resource_id; |
| 1641 entry.scale_factor = scale_factor; | 1641 entry.scale_factor = scale_factor; |
| 1642 entry.image = image; | 1642 entry.image = image; |
| 1643 image_cache_->push_front(entry); | 1643 image_cache_->push_front(entry); |
| 1644 if (image_cache_->size() > kMaxImageCacheSize) | 1644 if (image_cache_->size() > kMaxImageCacheSize) |
| 1645 image_cache_->pop_back(); | 1645 image_cache_->pop_back(); |
| 1646 } | 1646 } |
| OLD | NEW |