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/common/system/chromeos/audio/volume_view.cc

Issue 2675893002: Remove some pre-md code from TrayPopupUtils and UserView. (Closed)
Patch Set: Created 3 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
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/common/system/chromeos/audio/volume_view.h" 5 #include "ash/common/system/chromeos/audio/volume_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/common/material_design/material_design_controller.h" 9 #include "ash/common/material_design/material_design_controller.h"
10 #include "ash/common/metrics/user_metrics_action.h" 10 #include "ash/common/metrics/user_metrics_action.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 Update(); 178 Update();
179 return; 179 return;
180 } 180 }
181 181
182 more_button_ = new ButtonListenerActionableView( 182 more_button_ = new ButtonListenerActionableView(
183 owner_, TrayPopupInkDropStyle::INSET_BOUNDS, this); 183 owner_, TrayPopupInkDropStyle::INSET_BOUNDS, this);
184 TrayPopupUtils::ConfigureContainer(TriView::Container::END, more_button_); 184 TrayPopupUtils::ConfigureContainer(TriView::Container::END, more_button_);
185 more_button_->SetFocusBehavior(FocusBehavior::NEVER); 185 more_button_->SetFocusBehavior(FocusBehavior::NEVER);
186 186
187 device_type_ = TrayPopupUtils::CreateMoreImageView(); 187 device_type_ = TrayPopupUtils::CreateMoreImageView();
188 more_button_->SetBorder(views::CreateEmptyBorder( 188 more_button_->SetBorder(views::CreateEmptyBorder(gfx::Insets(
189 0, GetTrayConstant(TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET), 0, 189 0, GetTrayConstant(TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET))));
190 GetTrayConstant(TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET)));
191 more_button_->AddChildView(device_type_); 190 more_button_->AddChildView(device_type_);
192 191
193 views::ImageView* more_arrow = TrayPopupUtils::CreateMoreImageView(); 192 views::ImageView* more_arrow = TrayPopupUtils::CreateMoreImageView();
194 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { 193 if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
195 more_arrow->SetImage( 194 more_arrow->SetImage(
196 gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor)); 195 gfx::CreateVectorIcon(kSystemMenuArrowRightIcon, kMenuIconColor));
197 } else { 196 } else {
198 more_arrow->SetImage(ui::ResourceBundle::GetSharedInstance() 197 more_arrow->SetImage(ui::ResourceBundle::GetSharedInstance()
199 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) 198 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE)
200 .ToImageSkia()); 199 .ToImageSkia());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 void VolumeView::OnBoundsChanged(const gfx::Rect& previous_bounds) { 345 void VolumeView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
347 // Separator's prefered size is based on set bounds. When an empty bounds is 346 // Separator's prefered size is based on set bounds. When an empty bounds is
348 // set on first layout this causes BoxLayout to ignore the separator. Reset 347 // set on first layout this causes BoxLayout to ignore the separator. Reset
349 // its height on each bounds change so that it is laid out properly. 348 // its height on each bounds change so that it is laid out properly.
350 if (separator_) 349 if (separator_)
351 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height())); 350 separator_->SetSize(gfx::Size(kSeparatorSize, bounds().height()));
352 } 351 }
353 352
354 } // namespace tray 353 } // namespace tray
355 } // namespace ash 354 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/tray/system_menu_button.cc » ('j') | ash/common/system/user/user_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698