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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
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" | |
13 #include "content/public/browser/web_contents_delegate.h" | 12 #include "content/public/browser/web_contents_delegate.h" |
14 #include "ui/views/controls/webview/webview_export.h" | 13 #include "ui/views/controls/webview/webview_export.h" |
15 #include "ui/views/view.h" | 14 #include "ui/views/view.h" |
16 | 15 |
| 16 namespace content { |
| 17 class SiteInstance; |
| 18 } |
| 19 |
17 namespace views { | 20 namespace views { |
18 | 21 |
19 class NativeViewHost; | 22 class NativeViewHost; |
20 | 23 |
21 class WEBVIEW_EXPORT WebView : public View, | 24 class WEBVIEW_EXPORT WebView : public View, |
22 public content::NotificationObserver, | 25 public content::NotificationObserver, |
23 public content::WebContentsDelegate { | 26 public content::WebContentsDelegate { |
24 public: | 27 public: |
25 static const char kViewClassName[]; | 28 static const char kViewClassName[]; |
26 | 29 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 View* parent, | 88 View* parent, |
86 View* child) OVERRIDE; | 89 View* child) OVERRIDE; |
87 virtual bool SkipDefaultKeyEventProcessing( | 90 virtual bool SkipDefaultKeyEventProcessing( |
88 const ui::KeyEvent& event) OVERRIDE; | 91 const ui::KeyEvent& event) OVERRIDE; |
89 virtual bool IsFocusable() const OVERRIDE; | 92 virtual bool IsFocusable() const OVERRIDE; |
90 virtual void OnFocus() OVERRIDE; | 93 virtual void OnFocus() OVERRIDE; |
91 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 94 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
92 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 95 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
93 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 96 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
94 virtual gfx::Size GetPreferredSize() OVERRIDE; | 97 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 98 #if defined(USE_AURA) |
| 99 virtual bool CanDrop(const ui::OSExchangeData& data) OVERRIDE; |
| 100 virtual void OnDragEntered(const ui::DropTargetEvent& event) OVERRIDE; |
| 101 virtual int OnDragUpdated(const ui::DropTargetEvent& event) OVERRIDE; |
| 102 virtual void OnDragExited() OVERRIDE; |
| 103 virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE; |
| 104 #endif |
95 | 105 |
96 // Overridden from content::NotificationObserver: | 106 // Overridden from content::NotificationObserver: |
97 virtual void Observe(int type, | 107 virtual void Observe(int type, |
98 const content::NotificationSource& source, | 108 const content::NotificationSource& source, |
99 const content::NotificationDetails& details) OVERRIDE; | 109 const content::NotificationDetails& details) OVERRIDE; |
100 | 110 |
101 // Overridden from content::WebContentsDelegate: | 111 // Overridden from content::WebContentsDelegate: |
102 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; | 112 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; |
103 | 113 |
104 void AttachWebContents(); | 114 void AttachWebContents(); |
(...skipping 16 matching lines...) Expand all Loading... |
121 content::NotificationRegistrar registrar_; | 131 content::NotificationRegistrar registrar_; |
122 bool allow_accelerators_; | 132 bool allow_accelerators_; |
123 gfx::Size preferred_size_; | 133 gfx::Size preferred_size_; |
124 | 134 |
125 DISALLOW_COPY_AND_ASSIGN(WebView); | 135 DISALLOW_COPY_AND_ASSIGN(WebView); |
126 }; | 136 }; |
127 | 137 |
128 } // namespace views | 138 } // namespace views |
129 | 139 |
130 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 140 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
OLD | NEW |