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

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

Issue 7708025: Adds extension APIs of events on changing volume. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
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 10
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 // Accessibility information about a menu; this class is used by 249 // Accessibility information about a menu; this class is used by
250 // onMenuOpened, onMenuClosed, and onControlFocused event listeners. 250 // onMenuOpened, onMenuClosed, and onControlFocused event listeners.
251 class AccessibilityMenuInfo : public AccessibilityControlInfo { 251 class AccessibilityMenuInfo : public AccessibilityControlInfo {
252 public: 252 public:
253 AccessibilityMenuInfo(Profile* profile, const std::string& menu_name); 253 AccessibilityMenuInfo(Profile* profile, const std::string& menu_name);
254 254
255 virtual const char* type() const; 255 virtual const char* type() const;
256 }; 256 };
257 257
258 // Accessibility information about a volume; this class is used by
259 // onVolumeUp, onVolumeDown, and onVolumeMute event listeners.
260 class AccessibilityVolumeInfo : public AccessibilityControlInfo {
dmazzoni 2011/08/24 14:49:02 I think AccessibilityVolumeInfo shouldn't inherit
yoshiki 2011/08/29 09:16:16 Done.
261 public:
262 AccessibilityVolumeInfo(Profile* profile, double volume, bool is_mute);
dmazzoni 2011/08/24 14:49:02 Add a comment with the possible volume range, like
yoshiki 2011/08/29 09:16:16 Done.
263
264 virtual const char* type() const;
265
266 virtual void SerializeToDict(base::DictionaryValue* dict) const;
267
268 private:
269 double volume_;
270 bool is_mute_;
271 };
272
258 // Accessibility information about a menu item; this class is used by 273 // Accessibility information about a menu item; this class is used by
259 // onControlFocused event listeners. 274 // onControlFocused event listeners.
260 class AccessibilityMenuItemInfo : public AccessibilityControlInfo { 275 class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
261 public: 276 public:
262 AccessibilityMenuItemInfo(Profile* profile, 277 AccessibilityMenuItemInfo(Profile* profile,
263 const std::string& name, 278 const std::string& name,
264 bool has_submenu, 279 bool has_submenu,
265 int item_index, 280 int item_index,
266 int item_count); 281 int item_count);
267 282
268 virtual const char* type() const; 283 virtual const char* type() const;
269 284
270 virtual void SerializeToDict(base::DictionaryValue* dict) const; 285 virtual void SerializeToDict(base::DictionaryValue* dict) const;
271 286
272 int item_index() const { return item_index_; } 287 int item_index() const { return item_index_; }
273 int item_count() const { return item_count_; } 288 int item_count() const { return item_count_; }
274 bool has_submenu() const { return has_submenu_; } 289 bool has_submenu() const { return has_submenu_; }
275 290
276 private: 291 private:
277 bool has_submenu_; 292 bool has_submenu_;
278 // The 0-based index of the current item and the number of total items. 293 // The 0-based index of the current item and the number of total items.
279 int item_index_; 294 int item_index_;
280 int item_count_; 295 int item_count_;
281 }; 296 };
282 297
283 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ 298 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/accessibility_events.cc » ('j') | chrome/browser/chromeos/system_key_event_listener.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698