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

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

Issue 9406031: Makes it so the launcher only gets focus when using the keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk Created 8 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
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell.cc » ('j') | 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 IDR_AURA_LAUNCHER_TABBED_BROWSER_1_HOT); 58 IDR_AURA_LAUNCHER_TABBED_BROWSER_1_HOT);
59 bg_image_2_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_2, 59 bg_image_2_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_2,
60 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_PUSHED, 60 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_PUSHED,
61 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_HOT); 61 IDR_AURA_LAUNCHER_TABBED_BROWSER_2_HOT);
62 bg_image_3_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_3, 62 bg_image_3_ = CreateImageSet(IDR_AURA_LAUNCHER_TABBED_BROWSER_3,
63 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_PUSHED, 63 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_PUSHED,
64 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_HOT); 64 IDR_AURA_LAUNCHER_TABBED_BROWSER_3_HOT);
65 } 65 }
66 SetImageAlignment(views::ImageButton::ALIGN_CENTER, 66 SetImageAlignment(views::ImageButton::ALIGN_CENTER,
67 views::ImageButton::ALIGN_MIDDLE); 67 views::ImageButton::ALIGN_MIDDLE);
68 set_focusable(true); 68 set_accessibility_focusable(true);
69 } 69 }
70 70
71 TabbedLauncherButton::~TabbedLauncherButton() { 71 TabbedLauncherButton::~TabbedLauncherButton() {
72 } 72 }
73 73
74 void TabbedLauncherButton::PrepareForImageChange() { 74 void TabbedLauncherButton::PrepareForImageChange() {
75 if (!show_image_ || (animation_.get() && animation_->is_animating())) 75 if (!show_image_ || (animation_.get() && animation_->is_animating()))
76 return; 76 return;
77 77
78 // Pause for 500ms, then ease out for 200ms. 78 // Pause for 500ms, then ease out for 200ms.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 ImageSet* set = new ImageSet; 176 ImageSet* set = new ImageSet;
177 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 177 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
178 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap()); 178 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap());
179 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap()); 179 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap());
180 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap()); 180 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap());
181 return set; 181 return set;
182 } 182 }
183 183
184 } // namespace internal 184 } // namespace internal
185 } // namespace ash 185 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view.cc ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698