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

Side by Side Diff: chrome/views/view.h

Issue 93085: Removes the use of Windows-specific types for accessibility roles and states ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « chrome/views/controls/label_unittest.cc ('k') | chrome/views/widget/root_view.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_VIEWS_VIEW_H_ 5 #ifndef CHROME_VIEWS_VIEW_H_
6 #define CHROME_VIEWS_VIEW_H_ 6 #define CHROME_VIEWS_VIEW_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include <atlbase.h> 11 #include <atlbase.h>
12 #include <atlapp.h> 12 #include <atlapp.h>
13 #include <atlmisc.h> 13 #include <atlmisc.h>
14 #endif // defined(OS_WIN) 14 #endif // defined(OS_WIN)
15 15
16 #include <algorithm> 16 #include <algorithm>
17 #include <map> 17 #include <map>
18 #include <string> 18 #include <string>
19 #include <vector> 19 #include <vector>
20 20
21 #include "base/gfx/rect.h" 21 #include "base/gfx/rect.h"
22 #include "base/scoped_ptr.h" 22 #include "base/scoped_ptr.h"
23 #include "chrome/common/accessibility_types.h"
23 #include "chrome/views/accelerator.h" 24 #include "chrome/views/accelerator.h"
24 #include "chrome/views/background.h" 25 #include "chrome/views/background.h"
25 #include "chrome/views/border.h" 26 #include "chrome/views/border.h"
26 27
27 namespace gfx { 28 namespace gfx {
28 class Insets; 29 class Insets;
29 class Path; 30 class Path;
30 } 31 }
31 32
32 class ChromeCanvas; 33 class ChromeCanvas;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 // successful. 553 // successful.
553 virtual bool GetAccessibleKeyboardShortcut(std::wstring* shortcut) { 554 virtual bool GetAccessibleKeyboardShortcut(std::wstring* shortcut) {
554 return false; 555 return false;
555 } 556 }
556 557
557 // Returns a brief, identifying string, containing a unique, readable name of 558 // Returns a brief, identifying string, containing a unique, readable name of
558 // a given control. Sets the input string appropriately, and returns true if 559 // a given control. Sets the input string appropriately, and returns true if
559 // successful. 560 // successful.
560 virtual bool GetAccessibleName(std::wstring* name) { return false; } 561 virtual bool GetAccessibleName(std::wstring* name) { return false; }
561 562
562 #if defined(OS_WIN) 563 // Returns the accessibility role of the current view. The role is what
563 // TODO(port): Make these functions using VARIANT portable. 564 // assistive technologies (ATs) use to determine what behavior to expect from
565 // a given control. Sets the input Role appropriately, and returns true if
566 // successful.
567 virtual bool GetAccessibleRole(AccessibilityTypes::Role* role) {
568 return false;
569 }
564 570
565 // Returns the MSAA role of the current view. The role is what assistive 571 // Returns the accessibility state of the current view. Sets the input State
566 // technologies (ATs) use to determine what behavior to expect from a given 572 // appropriately, and returns true if successful.
567 // control. Sets the input VARIANT appropriately, and returns true if 573 virtual bool GetAccessibleState(AccessibilityTypes::State* state) {
568 // successful. 574 return false;
569 virtual bool GetAccessibleRole(VARIANT* role) { return false; } 575 }
570
571 // Returns the MSAA state of the current view. Sets the input VARIANT
572 // appropriately, and returns true if a change was performed successfully.
573 virtual bool GetAccessibleState(VARIANT* state) { return false; }
574 #endif // defined(OS_WIN)
575 576
576 // Assigns a keyboard shortcut string description to the given control. Needed 577 // Assigns a keyboard shortcut string description to the given control. Needed
577 // as a View does not know which shortcut will be associated with it until it 578 // as a View does not know which shortcut will be associated with it until it
578 // is created to be a certain type. 579 // is created to be a certain type.
579 virtual void SetAccessibleKeyboardShortcut(const std::wstring& shortcut) {} 580 virtual void SetAccessibleKeyboardShortcut(const std::wstring& shortcut) {}
580 581
581 // Assigns a string name to the given control. Needed as a View does not know 582 // Assigns a string name to the given control. Needed as a View does not know
582 // which name will be associated with it until it is created to be a 583 // which name will be associated with it until it is created to be a
583 // certain type. 584 // certain type.
584 virtual void SetAccessibleName(const std::wstring& name) {} 585 virtual void SetAccessibleName(const std::wstring& name) {}
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
1337 // is going to be flipped horizontally (using the appropriate transform) on 1338 // is going to be flipped horizontally (using the appropriate transform) on
1338 // right-to-left locales for this View. 1339 // right-to-left locales for this View.
1339 bool flip_canvas_on_paint_for_rtl_ui_; 1340 bool flip_canvas_on_paint_for_rtl_ui_;
1340 1341
1341 DISALLOW_COPY_AND_ASSIGN(View); 1342 DISALLOW_COPY_AND_ASSIGN(View);
1342 }; 1343 };
1343 1344
1344 } // namespace views 1345 } // namespace views
1345 1346
1346 #endif // CHROME_VIEWS_VIEW_H_ 1347 #endif // CHROME_VIEWS_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/views/controls/label_unittest.cc ('k') | chrome/views/widget/root_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698