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

Side by Side Diff: ash/system/audio/volume_view.cc

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 7 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/audio/volume_view.h" 5 #include "ash/system/audio/volume_view.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/system/audio/tray_audio.h" 9 #include "ash/system/audio/tray_audio.h"
10 #include "ash/system/audio/tray_audio_delegate.h" 10 #include "ash/system/audio/tray_audio_delegate.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 VolumeView::VolumeView(SystemTrayItem* owner, 103 VolumeView::VolumeView(SystemTrayItem* owner,
104 system::TrayAudioDelegate* audio_delegate, 104 system::TrayAudioDelegate* audio_delegate,
105 bool is_default_view) 105 bool is_default_view)
106 : owner_(owner), 106 : owner_(owner),
107 audio_delegate_(audio_delegate), 107 audio_delegate_(audio_delegate),
108 icon_(NULL), 108 icon_(NULL),
109 slider_(NULL), 109 slider_(NULL),
110 device_type_(NULL), 110 device_type_(NULL),
111 more_(NULL), 111 more_(NULL),
112 is_default_view_(is_default_view) { 112 is_default_view_(is_default_view) {
113 SetFocusable(false); 113 SetFocusBehavior(FocusBehavior::NEVER);
114 views::BoxLayout* box_layout = new views::BoxLayout( 114 views::BoxLayout* box_layout = new views::BoxLayout(
115 views::BoxLayout::kHorizontal, 0, 0, kBoxLayoutPadding); 115 views::BoxLayout::kHorizontal, 0, 0, kBoxLayoutPadding);
116 box_layout->SetDefaultFlex(0); 116 box_layout->SetDefaultFlex(0);
117 SetLayoutManager(box_layout); 117 SetLayoutManager(box_layout);
118 118
119 icon_ = new VolumeButton(this, audio_delegate_); 119 icon_ = new VolumeButton(this, audio_delegate_);
120 icon_->SetBorder(views::Border::CreateEmptyBorder( 120 icon_->SetBorder(views::Border::CreateEmptyBorder(
121 0, kTrayPopupPaddingHorizontal, 0, kExtraPaddingBetweenIconAndSlider)); 121 0, kTrayPopupPaddingHorizontal, 0, kExtraPaddingBetweenIconAndSlider));
122 AddChildView(icon_); 122 AddChildView(icon_);
123 123
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height())); 278 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height()));
279 } 279 }
280 280
281 void VolumeView::GetAccessibleState(ui::AXViewState* state) { 281 void VolumeView::GetAccessibleState(ui::AXViewState* state) {
282 // Intentionally overrides ActionableView, leaving |state| unset. A slider 282 // Intentionally overrides ActionableView, leaving |state| unset. A slider
283 // childview exposes accessibility data. 283 // childview exposes accessibility data.
284 } 284 }
285 285
286 } // namespace tray 286 } // namespace tray
287 } // namespace ash 287 } // namespace ash
OLDNEW
« no previous file with comments | « ash/sticky_keys/sticky_keys_overlay.cc ('k') | ash/system/chromeos/network/network_state_list_detailed_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698