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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
12 #include <windows.h> | 12 #include <windows.h> |
13 #endif | 13 #endif |
14 | 14 |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "ui/base/accessibility/accessibility_types.h" | 16 #include "ui/base/accessibility/accessibility_types.h" |
17 #include "ui/base/ui_base_types.h" | 17 #include "ui/base/ui_base_types.h" |
18 #include "ui/views/views_export.h" | 18 #include "ui/views/views_export.h" |
19 | 19 |
| 20 namespace content { |
| 21 class WebContents; |
| 22 class BrowserContext; |
| 23 class SiteInstance; |
| 24 } |
| 25 |
20 namespace gfx { | 26 namespace gfx { |
21 class Rect; | 27 class Rect; |
22 } | 28 } |
23 | 29 |
24 namespace ui { | 30 namespace ui { |
25 class Clipboard; | 31 class Clipboard; |
26 } | 32 } |
27 | 33 |
28 namespace views { | 34 namespace views { |
29 | 35 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 107 |
102 // Converts views::Event::flags to a WindowOpenDisposition. | 108 // Converts views::Event::flags to a WindowOpenDisposition. |
103 virtual int GetDispositionForEvent(int event_flags) = 0; | 109 virtual int GetDispositionForEvent(int event_flags) = 0; |
104 | 110 |
105 #if defined(USE_AURA) | 111 #if defined(USE_AURA) |
106 // Creates an object that implements desktop integration behavior. Returned | 112 // Creates an object that implements desktop integration behavior. Returned |
107 // object is owned by the NativeWidgetAura passed in. May return NULL. | 113 // object is owned by the NativeWidgetAura passed in. May return NULL. |
108 virtual NativeWidgetHelperAura* CreateNativeWidgetHelper( | 114 virtual NativeWidgetHelperAura* CreateNativeWidgetHelper( |
109 NativeWidgetAura* native_widget) = 0; | 115 NativeWidgetAura* native_widget) = 0; |
110 #endif | 116 #endif |
| 117 |
| 118 // Creates a web contents. This will return NULL unless overriden. |
| 119 virtual content::WebContents* CreateWebContents( |
| 120 content::BrowserContext* browser_context, |
| 121 content::SiteInstance* site_instance) = 0; |
111 }; | 122 }; |
112 | 123 |
113 } // namespace views | 124 } // namespace views |
114 | 125 |
115 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ | 126 #endif // UI_VIEWS_VIEWS_DELEGATE_H_ |
OLD | NEW |