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" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 #include "content/public/browser/web_contents.h" | 12 #include "content/public/browser/web_contents.h" |
13 #include "content/public/browser/web_contents_delegate.h" | 13 #include "content/public/browser/web_contents_delegate.h" |
14 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
15 | 15 |
16 namespace views { | 16 namespace views { |
17 | 17 |
18 class NativeViewHost; | 18 class NativeViewHost; |
19 | 19 |
20 class VIEWS_EXPORT WebView : public View, | 20 class VIEWS_EXPORT WebView |
21 public content::NotificationObserver, | 21 : public View, |
22 public content::WebContentsDelegate { | 22 public NON_EXPORTED_BASE(content::NotificationObserver), |
| 23 public NON_EXPORTED_BASE(content::WebContentsDelegate) { |
23 public: | 24 public: |
24 static const char kViewClassName[]; | 25 static const char kViewClassName[]; |
25 | 26 |
26 explicit WebView(content::BrowserContext* browser_context); | 27 explicit WebView(content::BrowserContext* browser_context); |
27 virtual ~WebView(); | 28 virtual ~WebView(); |
28 | 29 |
29 // This creates a WebContents if none is yet associated with this WebView. The | 30 // This creates a WebContents if none is yet associated with this WebView. The |
30 // WebView owns this implicitly created WebContents. | 31 // WebView owns this implicitly created WebContents. |
31 content::WebContents* GetWebContents(); | 32 content::WebContents* GetWebContents(); |
32 | 33 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 content::BrowserContext* browser_context_; | 109 content::BrowserContext* browser_context_; |
109 content::NotificationRegistrar registrar_; | 110 content::NotificationRegistrar registrar_; |
110 bool allow_accelerators_; | 111 bool allow_accelerators_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(WebView); | 113 DISALLOW_COPY_AND_ASSIGN(WebView); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace views | 116 } // namespace views |
116 | 117 |
117 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 118 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
OLD | NEW |