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