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

Side by Side Diff: ash/system/user/button_from_view.cc

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 years, 5 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
« no previous file with comments | « ash/system/chromeos/tray_display_unittest.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/user/button_from_view.h" 5 #include "ash/system/user/button_from_view.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/system/tray/tray_constants.h" 8 #include "ash/system/tray/tray_constants.h"
9 #include "ash/system/tray/tray_utils.h" 9 #include "ash/system/tray/tray_utils.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 View::OnBlur(); 82 View::OnBlur();
83 // Removing focus frame. 83 // Removing focus frame.
84 SchedulePaint(); 84 SchedulePaint();
85 } 85 }
86 86
87 void ButtonFromView::GetAccessibleState(ui::AXViewState* state) { 87 void ButtonFromView::GetAccessibleState(ui::AXViewState* state) {
88 state->role = ui::AX_ROLE_BUTTON; 88 state->role = ui::AX_ROLE_BUTTON;
89 std::vector<base::string16> labels; 89 std::vector<base::string16> labels;
90 for (int i = 0; i < child_count(); ++i) 90 for (int i = 0; i < child_count(); ++i)
91 GetAccessibleLabelFromDescendantViews(child_at(i), labels); 91 GetAccessibleLabelFromDescendantViews(child_at(i), labels);
92 state->name = JoinString(labels, base::ASCIIToUTF16(" ")); 92 state->name = base::JoinString(labels, base::ASCIIToUTF16(" "));
93 } 93 }
94 94
95 void ButtonFromView::ShowActive() { 95 void ButtonFromView::ShowActive() {
96 bool border_visible = 96 bool border_visible =
97 (button_hovered_ && highlight_on_hover_) || show_border_; 97 (button_hovered_ && highlight_on_hover_) || show_border_;
98 SkColor border_color = border_visible ? kBorderColor : SK_ColorTRANSPARENT; 98 SkColor border_color = border_visible ? kBorderColor : SK_ColorTRANSPARENT;
99 SetBorder(views::Border::CreateSolidBorder(1, border_color)); 99 SetBorder(views::Border::CreateSolidBorder(1, border_color));
100 if (highlight_on_hover_) { 100 if (highlight_on_hover_) {
101 SkColor background_color = 101 SkColor background_color =
102 button_hovered_ ? kHoverBackgroundColor : kBackgroundColor; 102 button_hovered_ ? kHoverBackgroundColor : kBackgroundColor;
103 content_->set_background( 103 content_->set_background(
104 views::Background::CreateSolidBackground(background_color)); 104 views::Background::CreateSolidBackground(background_color));
105 set_background(views::Background::CreateSolidBackground(background_color)); 105 set_background(views::Background::CreateSolidBackground(background_color));
106 } 106 }
107 SchedulePaint(); 107 SchedulePaint();
108 } 108 }
109 109
110 } // namespace tray 110 } // namespace tray
111 } // namespace ash 111 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/tray_display_unittest.cc ('k') | ash/system/user/user_card_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698