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

Side by Side Diff: ash/system/tray_caps_lock.cc

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | ash/system/tray_update.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 (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/tray_caps_lock.h" 5 #include "ash/system/tray_caps_lock.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/system/tray/tray_constants.h" 9 #include "ash/system/tray/tray_constants.h"
10 #include "ash/system/tray/tray_views.h" 10 #include "ash/system/tray/tray_views.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 text_label_->SetSize(gfx::Size(text_size.width() + new_x - old_x, 77 text_label_->SetSize(gfx::Size(text_size.width() + new_x - old_x,
78 text_size.height())); 78 text_size.height()));
79 } 79 }
80 80
81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE { 81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE {
82 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON; 82 state->role = ui::AccessibilityTypes::ROLE_PUSHBUTTON;
83 state->name = text_label_->text(); 83 state->name = text_label_->text();
84 } 84 }
85 85
86 // Overridden from ActionableView: 86 // Overridden from ActionableView:
87 virtual bool PerformAction(const views::Event& event) OVERRIDE { 87 virtual bool PerformAction(const ui::Event& event) OVERRIDE {
88 Shell::GetInstance()->tray_delegate()->SetCapsLockEnabled( 88 Shell::GetInstance()->tray_delegate()->SetCapsLockEnabled(
89 !Shell::GetInstance()->tray_delegate()->IsCapsLockOn()); 89 !Shell::GetInstance()->tray_delegate()->IsCapsLockOn());
90 return true; 90 return true;
91 } 91 }
92 92
93 views::Label* text_label_; 93 views::Label* text_label_;
94 views::Label* shortcut_label_; 94 views::Label* shortcut_label_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView); 96 DISALLOW_COPY_AND_ASSIGN(CapsLockDefaultView);
97 }; 97 };
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 message_shown_ = true; 172 message_shown_ = true;
173 } 173 }
174 } else if (detailed_) { 174 } else if (detailed_) {
175 detailed_->GetWidget()->Close(); 175 detailed_->GetWidget()->Close();
176 } 176 }
177 } 177 }
178 } 178 }
179 179
180 } // namespace internal 180 } // namespace internal
181 } // namespace ash 181 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray_accessibility.cc ('k') | ash/system/tray_update.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698