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

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

Issue 414203002: Modified tab change to work with status tray change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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
« 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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 rb.GetImageSkiaNamed(IDR_CLOSE_1_H)); 456 rb.GetImageSkiaNamed(IDR_CLOSE_1_H));
457 close_button_->SetImage(views::CustomButton::STATE_PRESSED, 457 close_button_->SetImage(views::CustomButton::STATE_PRESSED,
458 rb.GetImageSkiaNamed(IDR_CLOSE_1_P)); 458 rb.GetImageSkiaNamed(IDR_CLOSE_1_P));
459 close_button_->SetAccessibleName( 459 close_button_->SetAccessibleName(
460 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE)); 460 l10n_util::GetStringUTF16(IDS_ACCNAME_CLOSE));
461 // Disable animation so that the red danger sign shows up immediately 461 // Disable animation so that the red danger sign shows up immediately
462 // to help avoid mis-clicks. 462 // to help avoid mis-clicks.
463 close_button_->SetAnimationDuration(0); 463 close_button_->SetAnimationDuration(0);
464 AddChildView(close_button_); 464 AddChildView(close_button_);
465 465
466 SetAccessibilityFocusable(true);
sky 2014/07/25 03:19:30 Tabs aren't set up to be focusable. I'm not oppose
467
466 set_context_menu_controller(this); 468 set_context_menu_controller(this);
467 } 469 }
468 470
469 Tab::~Tab() { 471 Tab::~Tab() {
470 } 472 }
471 473
472 void Tab::set_animation_container(gfx::AnimationContainer* container) { 474 void Tab::set_animation_container(gfx::AnimationContainer* container) {
473 animation_container_ = container; 475 animation_container_ = container;
474 hover_controller_.SetAnimationContainer(container); 476 hover_controller_.SetAnimationContainer(container);
475 } 477 }
(...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 const gfx::ImageSkia& image) { 1654 const gfx::ImageSkia& image) {
1653 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); 1655 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE);
1654 ImageCacheEntry entry; 1656 ImageCacheEntry entry;
1655 entry.resource_id = resource_id; 1657 entry.resource_id = resource_id;
1656 entry.scale_factor = scale_factor; 1658 entry.scale_factor = scale_factor;
1657 entry.image = image; 1659 entry.image = image;
1658 image_cache_->push_front(entry); 1660 image_cache_->push_front(entry);
1659 if (image_cache_->size() > kMaxImageCacheSize) 1661 if (image_cache_->size() > kMaxImageCacheSize)
1660 image_cache_->pop_back(); 1662 image_cache_->pop_back();
1661 } 1663 }
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