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

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

Issue 9307036: Revert Aura changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/tabbed_launcher_button.h ('k') | ash/test/test_suite.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"
11 #include "ui/base/accessibility/accessible_view_state.h"
12 #include "ui/base/animation/multi_animation.h" 11 #include "ui/base/animation/multi_animation.h"
13 #include "ui/base/resource/resource_bundle.h" 12 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/canvas.h" 13 #include "ui/gfx/canvas.h"
15 #include "ui/gfx/image/image.h" 14 #include "ui/gfx/image/image.h"
16 #include "ui/gfx/insets.h" 15 #include "ui/gfx/insets.h"
17 16
18 namespace ash { 17 namespace ash {
19 namespace internal { 18 namespace internal {
20 19
21 TabbedLauncherButton::AnimationDelegateImpl::AnimationDelegateImpl( 20 TabbedLauncherButton::AnimationDelegateImpl::AnimationDelegateImpl(
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void TabbedLauncherButton::OnMouseMoved(const views::MouseEvent& event) { 155 void TabbedLauncherButton::OnMouseMoved(const views::MouseEvent& event) {
157 ImageButton::OnMouseMoved(event); 156 ImageButton::OnMouseMoved(event);
158 hover_controller_.SetLocation(event.location()); 157 hover_controller_.SetLocation(event.location());
159 } 158 }
160 159
161 void TabbedLauncherButton::OnMouseExited(const views::MouseEvent& event) { 160 void TabbedLauncherButton::OnMouseExited(const views::MouseEvent& event) {
162 ImageButton::OnMouseExited(event); 161 ImageButton::OnMouseExited(event);
163 hover_controller_.Hide(); 162 hover_controller_.Hide();
164 } 163 }
165 164
166 void TabbedLauncherButton::GetAccessibleState(ui::AccessibleViewState* state) {
167 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
168 state->name = host_->GetAccessibleName(this);
169 }
170
171 // static 165 // static
172 TabbedLauncherButton::ImageSet* TabbedLauncherButton::CreateImageSet( 166 TabbedLauncherButton::ImageSet* TabbedLauncherButton::CreateImageSet(
173 int normal_id, 167 int normal_id,
174 int pushed_id, 168 int pushed_id,
175 int hot_id) { 169 int hot_id) {
176 ImageSet* set = new ImageSet; 170 ImageSet* set = new ImageSet;
177 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 171 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
178 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap()); 172 set->normal_image = new SkBitmap(*rb.GetImageNamed(normal_id).ToSkBitmap());
179 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap()); 173 set->pushed_image = new SkBitmap(*rb.GetImageNamed(pushed_id).ToSkBitmap());
180 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap()); 174 set->hot_image = new SkBitmap(*rb.GetImageNamed(hot_id).ToSkBitmap());
181 return set; 175 return set;
182 } 176 }
183 177
184 } // namespace internal 178 } // namespace internal
185 } // namespace ash 179 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/tabbed_launcher_button.h ('k') | ash/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698