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

Side by Side Diff: ash/system/chromeos/network/network_list_detailed_view_base.cc

Issue 11415025: A11y: Introduce High Contrast Mode and Screen Magnifier to ubar tray. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase @170134 Created 8 years 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/shell_delegate.h ('k') | ash/system/tray/system_tray_delegate.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chromeos/network/network_list_detailed_view_base.h" 5 #include "ash/system/chromeos/network/network_list_detailed_view_base.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/tray/system_tray.h" 9 #include "ash/system/tray/system_tray.h"
10 #include "ash/system/tray/system_tray_delegate.h" 10 #include "ash/system/tray/system_tray_delegate.h"
11 #include "ash/system/tray/system_tray_item.h" 11 #include "ash/system/tray/system_tray_item.h"
12 #include "ash/system/tray/tray_constants.h" 12 #include "ash/system/tray/tray_constants.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "grit/ash_resources.h" 14 #include "grit/ash_resources.h"
15 #include "grit/ash_strings.h" 15 #include "grit/ash_strings.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
18 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
19 #include "ui/views/bubble/bubble_delegate.h" 19 #include "ui/views/bubble/bubble_delegate.h"
20 #include "ui/views/controls/label.h" 20 #include "ui/views/controls/label.h"
21 #include "ui/views/layout/box_layout.h" 21 #include "ui/views/layout/box_layout.h"
22 #include "ui/views/layout/fill_layout.h" 22 #include "ui/views/layout/fill_layout.h"
23 #include "ui/views/widget/widget.h" 23 #include "ui/views/widget/widget.h"
24 24
25 namespace { 25 namespace {
26 const int kPaddingAroundBottomRow = 5;
27 26
28 // Create a label with the font size and color used in the network info bubble. 27 // Create a label with the font size and color used in the network info bubble.
29 views::Label* CreateInfoBubbleLabel(const string16& text) { 28 views::Label* CreateInfoBubbleLabel(const string16& text) {
30 const SkColor text_color = SkColorSetARGB(127, 0, 0, 0); 29 const SkColor text_color = SkColorSetARGB(127, 0, 0, 0);
31 views::Label* label = new views::Label(text); 30 views::Label* label = new views::Label(text);
32 label->SetFont(label->font().DeriveFont(-1)); 31 label->SetFont(label->font().DeriveFont(-1));
33 label->SetEnabledColor(text_color); 32 label->SetEnabledColor(text_color);
34 return label; 33 return label;
35 } 34 }
36 35
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void NetworkListDetailedViewBase::AppendHeaderEntry(int header_string_id) { 131 void NetworkListDetailedViewBase::AppendHeaderEntry(int header_string_id) {
133 CreateSpecialRow(header_string_id, this); 132 CreateSpecialRow(header_string_id, this);
134 } 133 }
135 134
136 void NetworkListDetailedViewBase::AppendNetworkExtra() { 135 void NetworkListDetailedViewBase::AppendNetworkExtra() {
137 if (login_ == user::LOGGED_IN_LOCKED) 136 if (login_ == user::LOGGED_IN_LOCKED)
138 return; 137 return;
139 138
140 views::BoxLayout* layout = new 139 views::BoxLayout* layout = new
141 views::BoxLayout(views::BoxLayout::kHorizontal, 140 views::BoxLayout(views::BoxLayout::kHorizontal,
142 kPaddingAroundBottomRow, 141 kTrayMenuBottomRowPadding,
143 kPaddingAroundBottomRow, 142 kTrayMenuBottomRowPadding,
144 -1); 143 kTrayMenuBottomRowPaddingBetweenItems);
145 layout->set_spread_blank_space(true); 144 layout->set_spread_blank_space(true);
146 views::View* bottom_row = new View(); 145 views::View* bottom_row = new View();
147 bottom_row->SetLayoutManager(layout); 146 bottom_row->SetLayoutManager(layout);
148 147
149 AppendCustomButtonsToBottomRow(bottom_row); 148 AppendCustomButtonsToBottomRow(bottom_row);
150 149
151 CreateSettingsEntry(); 150 CreateSettingsEntry();
152 DCHECK(settings_ || proxy_settings_); 151 DCHECK(settings_ || proxy_settings_);
153 bottom_row->AddChildView(settings_ ? settings_ : proxy_settings_); 152 bottom_row->AddChildView(settings_ ? settings_ : proxy_settings_);
154 153
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 return false; 383 return false;
385 info_bubble_->GetWidget()->Close(); 384 info_bubble_->GetWidget()->Close();
386 info_bubble_ = NULL; 385 info_bubble_ = NULL;
387 return true; 386 return true;
388 } 387 }
389 388
390 } // namespace tray 389 } // namespace tray
391 390
392 } // namespace internal 391 } // namespace internal
393 } // namespace ash 392 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell_delegate.h ('k') | ash/system/tray/system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698