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

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

Issue 12096014: Highlight tabs while scrubbing Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review issues Created 7 years, 10 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
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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698