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_CONTROLS_WEBVIEW_WEBVIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/public/browser/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // Overridden from content::WebContentsDelegate: | 95 // Overridden from content::WebContentsDelegate: |
96 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; | 96 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; |
97 | 97 |
98 void AttachWebContents(); | 98 void AttachWebContents(); |
99 void DetachWebContents(); | 99 void DetachWebContents(); |
100 | 100 |
101 void RenderViewHostChanged(content::RenderViewHost* old_host, | 101 void RenderViewHostChanged(content::RenderViewHost* old_host, |
102 content::RenderViewHost* new_host); | 102 content::RenderViewHost* new_host); |
103 void WebContentsDestroyed(content::WebContents* web_contents); | 103 void WebContentsDestroyed(content::WebContents* web_contents); |
104 | 104 |
| 105 // Create a regular or test web contents (based on whether we're running |
| 106 // in a unit test or not). |
| 107 content::WebContents* CreateWebContents( |
| 108 content::BrowserContext* browser_context, |
| 109 content::SiteInstance* site_instance); |
| 110 |
| 111 |
105 NativeViewHost* wcv_holder_; | 112 NativeViewHost* wcv_holder_; |
106 scoped_ptr<content::WebContents> wc_owner_; | 113 scoped_ptr<content::WebContents> wc_owner_; |
107 content::WebContents* web_contents_; | 114 content::WebContents* web_contents_; |
108 content::BrowserContext* browser_context_; | 115 content::BrowserContext* browser_context_; |
109 content::NotificationRegistrar registrar_; | 116 content::NotificationRegistrar registrar_; |
110 bool allow_accelerators_; | 117 bool allow_accelerators_; |
111 | 118 |
112 DISALLOW_COPY_AND_ASSIGN(WebView); | 119 DISALLOW_COPY_AND_ASSIGN(WebView); |
113 }; | 120 }; |
114 | 121 |
115 } // namespace views | 122 } // namespace views |
116 | 123 |
117 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 124 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
OLD | NEW |