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

Side by Side Diff: views/views_delegate.h

Issue 3015026: Add initial tests for keyboard access (tabbing in some dialogs).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « views/view_win.cc ('k') | no next file » | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_VIEWS_DELEGATE_H_ 5 #ifndef VIEWS_VIEWS_DELEGATE_H_
6 #define VIEWS_VIEWS_DELEGATE_H_ 6 #define VIEWS_VIEWS_DELEGATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
11 #include <windows.h> 11 #include <windows.h>
12 #endif 12 #endif
13 13
14 #include "views/accessibility/accessibility_types.h"
15
14 class Clipboard; 16 class Clipboard;
15 17
16 namespace gfx { 18 namespace gfx {
17 class Rect; 19 class Rect;
18 } 20 }
19 21
20 namespace views { 22 namespace views {
21 23
24 class View;
25
22 // ViewsDelegate is an interface implemented by an object using the views 26 // ViewsDelegate is an interface implemented by an object using the views
23 // framework. It is used to obtain various high level application utilities 27 // framework. It is used to obtain various high level application utilities
24 // and perform some actions such as window placement saving. 28 // and perform some actions such as window placement saving.
25 // 29 //
26 // The embedding app must set views_delegate to assign its ViewsDelegate 30 // The embedding app must set views_delegate to assign its ViewsDelegate
27 // implementation. 31 // implementation.
28 class ViewsDelegate { 32 class ViewsDelegate {
29 public: 33 public:
30 virtual ~ViewsDelegate() {} 34 virtual ~ViewsDelegate() {}
31 35
32 // Gets the clipboard. 36 // Gets the clipboard.
33 virtual Clipboard* GetClipboard() const = 0; 37 virtual Clipboard* GetClipboard() const = 0;
34 38
35 // Saves the position, size and maximized state for the window with the 39 // Saves the position, size and maximized state for the window with the
36 // specified name. 40 // specified name.
37 virtual void SaveWindowPlacement(const std::wstring& window_name, 41 virtual void SaveWindowPlacement(const std::wstring& window_name,
38 const gfx::Rect& bounds, 42 const gfx::Rect& bounds,
39 bool maximized) = 0; 43 bool maximized) = 0;
40 44
41 // Retrieves the saved position and size for the window with the specified 45 // Retrieves the saved position and size for the window with the specified
42 // name. 46 // name.
43 virtual bool GetSavedWindowBounds(const std::wstring& window_name, 47 virtual bool GetSavedWindowBounds(const std::wstring& window_name,
44 gfx::Rect* bounds) const = 0; 48 gfx::Rect* bounds) const = 0;
45 49
46 // Retrieves the saved maximized state for the window with the specified 50 // Retrieves the saved maximized state for the window with the specified
47 // name. 51 // name.
48 virtual bool GetSavedMaximizedState(const std::wstring& window_name, 52 virtual bool GetSavedMaximizedState(const std::wstring& window_name,
49 bool* maximized) const = 0; 53 bool* maximized) const = 0;
50 54
55 // Notify the delegate that an accessibility event has happened in
56 // a particular view.
57 virtual void NotifyAccessibilityEvent(
58 views::View* view, AccessibilityTypes::Event event_type) = 0;
59
51 #if defined(OS_WIN) 60 #if defined(OS_WIN)
52 // Retrieves the default window icon to use for windows if none is specified. 61 // Retrieves the default window icon to use for windows if none is specified.
53 virtual HICON GetDefaultWindowIcon() const = 0; 62 virtual HICON GetDefaultWindowIcon() const = 0;
54 #endif 63 #endif
55 64
56 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to 65 // AddRef/ReleaseRef are invoked while a menu is visible. They are used to
57 // ensure we don't attempt to exit while a menu is showing. 66 // ensure we don't attempt to exit while a menu is showing.
58 virtual void AddRef() = 0; 67 virtual void AddRef() = 0;
59 virtual void ReleaseRef() = 0; 68 virtual void ReleaseRef() = 0;
60 69
61 // The active ViewsDelegate used by the views system. 70 // The active ViewsDelegate used by the views system.
62 static ViewsDelegate* views_delegate; 71 static ViewsDelegate* views_delegate;
63 }; 72 };
64 73
65 } // namespace views 74 } // namespace views
66 75
67 #endif // VIEWS_VIEWS_DELEGATE_H_ 76 #endif // VIEWS_VIEWS_DELEGATE_H_
OLDNEW
« no previous file with comments | « views/view_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698