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

Side by Side Diff: ash/common/system/chromeos/palette/palette_tray.cc

Issue 2721553004: Remove auto raw pointer deduction from non-linux specific code. (Closed)
Patch Set: rebase Created 3 years, 9 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/palette/palette_tray.h" 5 #include "ash/common/system/chromeos/palette/palette_tray.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/shelf/shelf_constants.h" 9 #include "ash/common/shelf/shelf_constants.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 class TitleView : public views::View, public views::ButtonListener { 76 class TitleView : public views::View, public views::ButtonListener {
77 public: 77 public:
78 explicit TitleView(PaletteTray* palette_tray) : palette_tray_(palette_tray) { 78 explicit TitleView(PaletteTray* palette_tray) : palette_tray_(palette_tray) {
79 // TODO(tdanderson|jdufault): Use TriView to handle the layout of the title. 79 // TODO(tdanderson|jdufault): Use TriView to handle the layout of the title.
80 // See crbug.com/614453. 80 // See crbug.com/614453.
81 auto* box_layout = 81 auto* box_layout =
82 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0); 82 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 0);
83 SetLayoutManager(box_layout); 83 SetLayoutManager(box_layout);
84 84
85 auto title_label = 85 auto* title_label =
86 new views::Label(l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE)); 86 new views::Label(l10n_util::GetStringUTF16(IDS_ASH_STYLUS_TOOLS_TITLE));
87 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); 87 title_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
88 AddChildView(title_label); 88 AddChildView(title_label);
89 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE); 89 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::TITLE);
90 style.SetupLabel(title_label); 90 style.SetupLabel(title_label);
91 box_layout->SetFlexForView(title_label, 1); 91 box_layout->SetFlexForView(title_label, 1);
92 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { 92 if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
93 help_button_ = 93 help_button_ =
94 new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, 94 new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED,
95 kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP); 95 kSystemMenuHelpIcon, IDS_ASH_STATUS_TRAY_HELP);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 UpdateIconVisibility(); 430 UpdateIconVisibility();
431 } 431 }
432 } 432 }
433 433
434 void PaletteTray::UpdateIconVisibility() { 434 void PaletteTray::UpdateIconVisibility() {
435 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() && 435 SetVisible(is_palette_enabled_ && palette_utils::HasStylusInput() &&
436 IsInUserSession()); 436 IsInUserSession());
437 } 437 }
438 438
439 } // namespace ash 439 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | ash/common/system/chromeos/tray_caps_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698