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

Side by Side Diff: ash/sticky_keys/sticky_keys_overlay.cc

Issue 1898633004: Views: Add new SetFocusBehavior method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 7 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/shell/lock_view.cc ('k') | ash/system/audio/volume_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/sticky_keys/sticky_keys_overlay.h" 5 #include "ash/sticky_keys/sticky_keys_overlay.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/sticky_keys/sticky_keys_controller.h" 9 #include "ash/sticky_keys/sticky_keys_controller.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 StickyKeyOverlayLabel::StickyKeyOverlayLabel(const std::string& key_name) 62 StickyKeyOverlayLabel::StickyKeyOverlayLabel(const std::string& key_name)
63 : state_(STICKY_KEY_STATE_DISABLED) { 63 : state_(STICKY_KEY_STATE_DISABLED) {
64 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 64 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
65 65
66 SetText(base::UTF8ToUTF16(key_name)); 66 SetText(base::UTF8ToUTF16(key_name));
67 SetHorizontalAlignment(gfx::ALIGN_LEFT); 67 SetHorizontalAlignment(gfx::ALIGN_LEFT);
68 SetFontList(rb->GetFontList(kKeyLabelFontStyle)); 68 SetFontList(rb->GetFontList(kKeyLabelFontStyle));
69 SetAutoColorReadabilityEnabled(false); 69 SetAutoColorReadabilityEnabled(false);
70 SetFocusable(false);
71 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); 70 SetEnabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF));
72 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF)); 71 SetDisabledColor(SkColorSetARGB(0x80, 0xFF, 0xFF, 0xFF));
73 SetSubpixelRenderingEnabled(false); 72 SetSubpixelRenderingEnabled(false);
74 } 73 }
75 74
76 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() { 75 StickyKeyOverlayLabel::~StickyKeyOverlayLabel() {
77 } 76 }
78 77
79 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) { 78 void StickyKeyOverlayLabel::SetKeyState(StickyKeyState state) {
80 state_ = state; 79 state_ = state;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator(); 315 ui::LayerAnimator* animator = overlay_widget_->GetLayer()->GetAnimator();
317 if (animator) 316 if (animator)
318 animator->RemoveObserver(this); 317 animator->RemoveObserver(this);
319 } 318 }
320 319
321 void StickyKeysOverlay::OnLayerAnimationScheduled( 320 void StickyKeysOverlay::OnLayerAnimationScheduled(
322 ui::LayerAnimationSequence* sequence) { 321 ui::LayerAnimationSequence* sequence) {
323 } 322 }
324 323
325 } // namespace ash 324 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell/lock_view.cc ('k') | ash/system/audio/volume_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698