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

Side by Side Diff: ash/launcher/tabbed_launcher_button.cc

Issue 9113056: Change the launcher to use AccessiblePaneView, and make the buttons focusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make overflow button focusable Created 8 years, 11 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
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | 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 "ash/launcher/tabbed_launcher_button.h" 5 #include "ash/launcher/tabbed_launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 IDR_AURA_LAUNCHER_TABBED_BROWSER_1_HOT); 57 IDR_AURA_LAUNCHER_TABBED_BROWSER_1_HOT);
58 bg_image_2_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_2, 58 bg_image_2_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_2,
59 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_PUSHED, 59 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_PUSHED,
60 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_HOT); 60 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_HOT);
61 bg_image_3_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_3, 61 bg_image_3_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_3,
62 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_PUSHED, 62 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_PUSHED,
63 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_HOT); 63 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_HOT);
64 } 64 }
65 SetImageAlignment(views::ImageButton::ALIGN_CENTER, 65 SetImageAlignment(views::ImageButton::ALIGN_CENTER,
66 views::ImageButton::ALIGN_MIDDLE); 66 views::ImageButton::ALIGN_MIDDLE);
67 set_focusable(true);
67 } 68 }
68 69
69 TabbedLauncherButton::~TabbedLauncherButton() { 70 TabbedLauncherButton::~TabbedLauncherButton() {
70 } 71 }
71 72
72 void TabbedLauncherButton::PrepareForImageChange() { 73 void TabbedLauncherButton::PrepareForImageChange() {
73 if (!show_image_ || (animation_.get() && animation_->is_animating())) 74 if (!show_image_ || (animation_.get() && animation_->is_animating()))
74 return; 75 return;
75 76
76 // Pause for 500ms, then ease out for 200ms. 77 // Pause for 500ms, then ease out for 200ms.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ImageSet* set = new ImageSet; 170 ImageSet* set = new ImageSet;
170 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 171 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
171 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap()); 172 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap());
172 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap()); 173 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap());
173 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap()); 174 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap());
174 return set; 175 return set;
175 } 176 }
176 177
177 } // namespace internal 178 } // namespace internal
178 } // namespace ash 179 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698