OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_VIEWS_DELEGATE_H_ | 5 #ifndef UI_VIEWS_VIEWS_DELEGATE_H_ |
6 #define UI_VIEWS_VIEWS_DELEGATE_H_ | 6 #define UI_VIEWS_VIEWS_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // The accelerator was not handled. Menu should be closed and the | 81 // The accelerator was not handled. Menu should be closed and the |
82 // accelerator will be reposted to be handled after the menu closes. | 82 // accelerator will be reposted to be handled after the menu closes. |
83 CLOSE_MENU | 83 CLOSE_MENU |
84 }; | 84 }; |
85 | 85 |
86 virtual ~ViewsDelegate(); | 86 virtual ~ViewsDelegate(); |
87 | 87 |
88 // Returns the ViewsDelegate instance if there is one, or nullptr otherwise. | 88 // Returns the ViewsDelegate instance if there is one, or nullptr otherwise. |
89 static ViewsDelegate* GetInstance(); | 89 static ViewsDelegate* GetInstance(); |
90 | 90 |
| 91 // Allows the delegate to override creation of the default NativeWidget |
| 92 // implementation used by Widget. |
| 93 virtual NativeWidget* CreateNativeWidget( |
| 94 internal::NativeWidgetDelegate* delegate); |
| 95 |
91 // Saves the position, size and "show" state for the window with the | 96 // Saves the position, size and "show" state for the window with the |
92 // specified name. | 97 // specified name. |
93 virtual void SaveWindowPlacement(const Widget* widget, | 98 virtual void SaveWindowPlacement(const Widget* widget, |
94 const std::string& window_name, | 99 const std::string& window_name, |
95 const gfx::Rect& bounds, | 100 const gfx::Rect& bounds, |
96 ui::WindowShowState show_state); | 101 ui::WindowShowState show_state); |
97 | 102 |
98 // Retrieves the saved position and size and "show" state for the window with | 103 // Retrieves the saved position and size and "show" state for the window with |
99 // the specified name. | 104 // the specified name. |
100 virtual bool GetSavedWindowPlacement(const Widget* widget, | 105 virtual bool GetSavedWindowPlacement(const Widget* widget, |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 #if defined(USE_AURA) | 193 #if defined(USE_AURA) |
189 scoped_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; | 194 scoped_ptr<TouchSelectionMenuRunnerViews> touch_selection_menu_runner_; |
190 #endif | 195 #endif |
191 | 196 |
192 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); | 197 DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); |
193 }; | 198 }; |
194 | 199 |
195 } // namespace views | 200 } // namespace views |
196 | 201 |
197 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 202 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |