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

Side by Side Diff: ash/launcher/launcher_view.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.cc ('k') | ash/launcher/tabbed_launcher_button.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/launcher_view.h" 5 #include "ash/launcher/launcher_view.h"
6 6
7 #include "ash/launcher/app_launcher_button.h" 7 #include "ash/launcher/app_launcher_button.h"
8 #include "ash/launcher/launcher_model.h" 8 #include "ash/launcher/launcher_model.h"
9 #include "ash/launcher/launcher_window_cycler.h" 9 #include "ash/launcher/launcher_window_cycler.h"
10 #include "ash/launcher/tabbed_launcher_button.h" 10 #include "ash/launcher/tabbed_launcher_button.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 const LauncherItems& items(model_->items()); 204 const LauncherItems& items(model_->items());
205 for (LauncherItems::const_iterator i = items.begin(); i != items.end(); ++i) { 205 for (LauncherItems::const_iterator i = items.begin(); i != items.end(); ++i) {
206 views::View* child = CreateViewForItem(*i); 206 views::View* child = CreateViewForItem(*i);
207 child->SetPaintToLayer(true); 207 child->SetPaintToLayer(true);
208 view_model_->Add(child, static_cast<int>(i - items.begin())); 208 view_model_->Add(child, static_cast<int>(i - items.begin()));
209 AddChildView(child); 209 AddChildView(child);
210 } 210 }
211 211
212 overflow_button_ = new views::ImageButton(this); 212 overflow_button_ = new views::ImageButton(this);
213 overflow_button_->set_focusable(true);
213 overflow_button_->SetImage( 214 overflow_button_->SetImage(
214 views::CustomButton::BS_NORMAL, 215 views::CustomButton::BS_NORMAL,
215 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToSkBitmap()); 216 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW).ToSkBitmap());
216 overflow_button_->SetImage( 217 overflow_button_->SetImage(
217 views::CustomButton::BS_HOT, 218 views::CustomButton::BS_HOT,
218 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToSkBitmap()); 219 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_HOT).ToSkBitmap());
219 overflow_button_->SetImage( 220 overflow_button_->SetImage(
220 views::CustomButton::BS_PUSHED, 221 views::CustomButton::BS_PUSHED,
221 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToSkBitmap()); 222 rb.GetImageNamed(IDR_AURA_LAUNCHER_OVERFLOW_PUSHED).ToSkBitmap());
222 ConfigureChildView(overflow_button_); 223 ConfigureChildView(overflow_button_);
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 cycler_->Cycle(); 638 cycler_->Cycle();
638 break; 639 break;
639 640
640 default: 641 default:
641 NOTREACHED(); 642 NOTREACHED();
642 } 643 }
643 } 644 }
644 645
645 } // namespace internal 646 } // namespace internal
646 } // namespace ash 647 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher.cc ('k') | ash/launcher/tabbed_launcher_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698