OLD | NEW |
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 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 "ui/base/accessibility/accessibility_types.h" | 14 #include "ui/base/accessibility/accessibility_types.h" |
15 #include "ui/base/ui_base_types.h" | |
16 #include "views/views_export.h" | 15 #include "views/views_export.h" |
17 | 16 |
18 namespace gfx { | 17 namespace gfx { |
19 class Rect; | 18 class Rect; |
20 } | 19 } |
21 | 20 |
22 namespace ui { | 21 namespace ui { |
23 class Clipboard; | 22 class Clipboard; |
24 } | 23 } |
25 | 24 |
(...skipping 14 matching lines...) Expand all Loading... |
40 | 39 |
41 // Gets the clipboard. | 40 // Gets the clipboard. |
42 virtual ui::Clipboard* GetClipboard() const = 0; | 41 virtual ui::Clipboard* GetClipboard() const = 0; |
43 | 42 |
44 // Returns the View that all synthetic widgets created without a specified | 43 // Returns the View that all synthetic widgets created without a specified |
45 // parent will be parented to if they do not specify a parent in their | 44 // parent will be parented to if they do not specify a parent in their |
46 // InitParams, or NULL if they should have no parent. | 45 // InitParams, or NULL if they should have no parent. |
47 // TODO(beng): perhaps this should be a Widget. | 46 // TODO(beng): perhaps this should be a Widget. |
48 virtual View* GetDefaultParentView() = 0; | 47 virtual View* GetDefaultParentView() = 0; |
49 | 48 |
50 // Saves the position, size and "show" state for the window with the | 49 // Saves the position, size and maximized state for the window with the |
51 // specified name. | 50 // specified name. |
52 virtual void SaveWindowPlacement(const Widget* widget, | 51 virtual void SaveWindowPlacement(const Widget* widget, |
53 const std::wstring& window_name, | 52 const std::wstring& window_name, |
54 const gfx::Rect& bounds, | 53 const gfx::Rect& bounds, |
55 ui::WindowShowState show_state) = 0; | 54 bool maximized) = 0; |
56 | 55 |
57 // Retrieves the saved position and size and "show" state for the window with | 56 // Retrieves the saved position and size for the window with the specified |
58 // the specified name. | 57 // name. |
59 virtual bool GetSavedWindowPlacement( | 58 virtual bool GetSavedWindowBounds(const std::wstring& window_name, |
60 const std::wstring& window_name, | 59 gfx::Rect* bounds) const = 0; |
61 gfx::Rect* bounds, | 60 |
62 ui::WindowShowState* show_state) const = 0; | 61 // Retrieves the saved maximized state for the window with the specified |
| 62 // name. |
| 63 virtual bool GetSavedMaximizedState(const std::wstring& window_name, |
| 64 bool* maximized) const = 0; |
63 | 65 |
64 virtual void NotifyAccessibilityEvent( | 66 virtual void NotifyAccessibilityEvent( |
65 views::View* view, ui::AccessibilityTypes::Event event_type) = 0; | 67 views::View* view, ui::AccessibilityTypes::Event event_type) = 0; |
66 | 68 |
67 // For accessibility, notify the delegate that a menu item was focused | 69 // For accessibility, notify the delegate that a menu item was focused |
68 // so that alternate feedback (speech / magnified text) can be provided. | 70 // so that alternate feedback (speech / magnified text) can be provided. |
69 virtual void NotifyMenuItemFocused( | 71 virtual void NotifyMenuItemFocused( |
70 const std::wstring& menu_name, | 72 const std::wstring& menu_name, |
71 const std::wstring& menu_item_name, | 73 const std::wstring& menu_item_name, |
72 int item_index, | 74 int item_index, |
(...skipping 13 matching lines...) Expand all Loading... |
86 // Converts views::Event::flags to a WindowOpenDisposition. | 88 // Converts views::Event::flags to a WindowOpenDisposition. |
87 virtual int GetDispositionForEvent(int event_flags) = 0; | 89 virtual int GetDispositionForEvent(int event_flags) = 0; |
88 | 90 |
89 // The active ViewsDelegate used by the views system. | 91 // The active ViewsDelegate used by the views system. |
90 static ViewsDelegate* views_delegate; | 92 static ViewsDelegate* views_delegate; |
91 }; | 93 }; |
92 | 94 |
93 } // namespace views | 95 } // namespace views |
94 | 96 |
95 #endif // VIEWS_VIEWS_DELEGATE_H_ | 97 #endif // VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |