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

Side by Side Diff: chrome/browser/accessibility_events.h

Issue 8558014: Add experimental extension APIs to notify about wakeup and screen unlock (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased to ToT Created 9 years, 1 month 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 | « no previous file | chrome/browser/accessibility_events.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_
6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ 6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 // |volume| must range between 0 to 100. 278 // |volume| must range between 0 to 100.
279 AccessibilityVolumeInfo(Profile* profile, double volume, bool is_muted); 279 AccessibilityVolumeInfo(Profile* profile, double volume, bool is_muted);
280 280
281 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; 281 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
282 282
283 private: 283 private:
284 double volume_; 284 double volume_;
285 bool is_muted_; 285 bool is_muted_;
286 }; 286 };
287 287
288 // Screen unlock event information; this class is used by onScreenUnlocked.
289 class ScreenUnlockedEventInfo : public AccessibilityEventInfo {
290 public:
291 ScreenUnlockedEventInfo(Profile* profile);
292 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
293 };
294
295 // Wake up event information; this class is used by onWokeUp.
296 class WokeUpEventInfo : public AccessibilityEventInfo {
297 public:
298 WokeUpEventInfo(Profile* profile);
299 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
300 };
301
288 // Accessibility information about a menu item; this class is used by 302 // Accessibility information about a menu item; this class is used by
289 // onControlFocused event listeners. 303 // onControlFocused event listeners.
290 class AccessibilityMenuItemInfo : public AccessibilityControlInfo { 304 class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
291 public: 305 public:
292 AccessibilityMenuItemInfo(Profile* profile, 306 AccessibilityMenuItemInfo(Profile* profile,
293 const std::string& name, 307 const std::string& name,
294 bool has_submenu, 308 bool has_submenu,
295 int item_index, 309 int item_index,
296 int item_count); 310 int item_count);
297 311
298 virtual const char* type() const OVERRIDE; 312 virtual const char* type() const OVERRIDE;
299 313
300 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE; 314 virtual void SerializeToDict(base::DictionaryValue* dict) const OVERRIDE;
301 315
302 int item_index() const { return item_index_; } 316 int item_index() const { return item_index_; }
303 int item_count() const { return item_count_; } 317 int item_count() const { return item_count_; }
304 bool has_submenu() const { return has_submenu_; } 318 bool has_submenu() const { return has_submenu_; }
305 319
306 private: 320 private:
307 bool has_submenu_; 321 bool has_submenu_;
308 // The 0-based index of the current item and the number of total items. 322 // The 0-based index of the current item and the number of total items.
309 int item_index_; 323 int item_index_;
310 int item_count_; 324 int item_count_;
311 }; 325 };
312 326
313 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ 327 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698