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

Side by Side Diff: ash/common/system/chromeos/network/vpn_list_view.cc

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/network/vpn_list_view.h" 5 #include "ash/common/system/chromeos/network/vpn_list_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SetLayoutManager(new views::FillLayout); 117 SetLayoutManager(new views::FillLayout);
118 TriView* tri_view = TrayPopupUtils::CreateSubHeaderRowView(); 118 TriView* tri_view = TrayPopupUtils::CreateSubHeaderRowView();
119 AddChildView(tri_view); 119 AddChildView(tri_view);
120 120
121 views::Label* label = TrayPopupUtils::CreateDefaultLabel(); 121 views::Label* label = TrayPopupUtils::CreateDefaultLabel();
122 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SUB_HEADER); 122 TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SUB_HEADER);
123 style.SetupLabel(label); 123 style.SetupLabel(label);
124 label->SetText(base::ASCIIToUTF16(name)); 124 label->SetText(base::ASCIIToUTF16(name));
125 tri_view->AddView(TriView::Container::CENTER, label); 125 tri_view->AddView(TriView::Container::CENTER, label);
126 126
127 gfx::ImageSkia icon = gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, 127 const SkColor image_color = GetNativeTheme()->GetSystemColor(
128 style.GetIconColor()); 128 ui::NativeTheme::kColorId_ProminentButtonColor);
129 gfx::ImageSkia icon =
130 gfx::CreateVectorIcon(kSystemMenuAddConnectionIcon, image_color);
129 SystemMenuButton* add_vpn_button = 131 SystemMenuButton* add_vpn_button =
130 new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, icon, 132 new SystemMenuButton(this, TrayPopupInkDropStyle::HOST_CENTERED, icon,
131 icon, button_accessible_name_id); 133 icon, button_accessible_name_id);
132 add_vpn_button->SetInkDropColor(style.GetIconColor()); 134 add_vpn_button->SetInkDropColor(image_color);
133 add_vpn_button->SetEnabled(true); 135 add_vpn_button->SetEnabled(true);
134 tri_view->AddView(TriView::Container::END, add_vpn_button); 136 tri_view->AddView(TriView::Container::END, add_vpn_button);
135 } 137 }
136 138
137 protected: 139 protected:
138 // views::ButtonListener: 140 // views::ButtonListener:
139 void ButtonPressed(views::Button* sender, const ui::Event& event) override { 141 void ButtonPressed(views::Button* sender, const ui::Event& event) override {
140 parent_->OnViewClicked(this); 142 parent_->OnViewClicked(this);
141 } 143 }
142 144
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 525 }
524 } 526 }
525 527
526 // Add providers without any configured networks, in the order that the 528 // Add providers without any configured networks, in the order that the
527 // providers were returned by the extensions system. 529 // providers were returned by the extensions system.
528 for (const VPNProvider& provider : providers) 530 for (const VPNProvider& provider : providers)
529 AddProviderAndNetworks(provider, networks); 531 AddProviderAndNetworks(provider, networks);
530 } 532 }
531 533
532 } // namespace ash 534 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_vpn.cc ('k') | ash/common/system/chromeos/palette/palette_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698