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

Side by Side Diff: ash/system/chromeos/audio/tray_audio.cc

Issue 108063004: Give up focus if the focused view becomes unfocusable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extracted to common code into FocusManager class Created 7 years 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
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/system/chromeos/audio/tray_audio.h" 5 #include "ash/system/chromeos/audio/tray_audio.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 public views::SliderListener { 198 public views::SliderListener {
199 public: 199 public:
200 VolumeView(SystemTrayItem* owner, bool is_default_view) 200 VolumeView(SystemTrayItem* owner, bool is_default_view)
201 : owner_(owner), 201 : owner_(owner),
202 icon_(NULL), 202 icon_(NULL),
203 slider_(NULL), 203 slider_(NULL),
204 bar_(NULL), 204 bar_(NULL),
205 device_type_(NULL), 205 device_type_(NULL),
206 more_(NULL), 206 more_(NULL),
207 is_default_view_(is_default_view) { 207 is_default_view_(is_default_view) {
208 set_focusable(false); 208 SetFocusable(false);
209 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, 209 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal,
210 kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems)); 210 kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingBetweenItems));
211 211
212 icon_ = new VolumeButton(this); 212 icon_ = new VolumeButton(this);
213 AddChildView(icon_); 213 AddChildView(icon_);
214 214
215 slider_ = new VolumeSlider(this); 215 slider_ = new VolumeSlider(this);
216 AddChildView(slider_); 216 AddChildView(slider_);
217 217
218 bar_ = new BarSeparator; 218 bar_ = new BarSeparator;
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 if (audio_detail_) 644 if (audio_detail_)
645 audio_detail_->Update(); 645 audio_detail_->Update();
646 if (volume_view_) { 646 if (volume_view_) {
647 volume_view_->SetVolumeLevel(GetVolumeLevel()); 647 volume_view_->SetVolumeLevel(GetVolumeLevel());
648 volume_view_->Update(); 648 volume_view_->Update();
649 } 649 }
650 } 650 }
651 651
652 } // namespace internal 652 } // namespace internal
653 } // namespace ash 653 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698