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/web_contents_delegate.h" | 10 #include "content/public/browser/web_contents_delegate.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 void set_allow_accelerators(bool allow_accelerators) { | 73 void set_allow_accelerators(bool allow_accelerators) { |
74 allow_accelerators_ = allow_accelerators; | 74 allow_accelerators_ = allow_accelerators; |
75 } | 75 } |
76 | 76 |
77 // Sets the preferred size. If empty, View's implementation of | 77 // Sets the preferred size. If empty, View's implementation of |
78 // GetPreferredSize() is used. | 78 // GetPreferredSize() is used. |
79 void SetPreferredSize(const gfx::Size& preferred_size); | 79 void SetPreferredSize(const gfx::Size& preferred_size); |
80 | 80 |
81 // Overridden from View: | 81 // Overridden from View: |
82 virtual const char* GetClassName() const OVERRIDE; | 82 virtual const char* GetClassName() const OVERRIDE; |
| 83 virtual ui::TextInputClient* GetTextInputClient() OVERRIDE; |
83 | 84 |
84 private: | 85 private: |
85 // Overridden from View: | 86 // Overridden from View: |
86 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; | 87 virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |
87 virtual void ViewHierarchyChanged( | 88 virtual void ViewHierarchyChanged( |
88 const ViewHierarchyChangedDetails& details) OVERRIDE; | 89 const ViewHierarchyChangedDetails& details) OVERRIDE; |
89 virtual bool SkipDefaultKeyEventProcessing( | 90 virtual bool SkipDefaultKeyEventProcessing( |
90 const ui::KeyEvent& event) OVERRIDE; | 91 const ui::KeyEvent& event) OVERRIDE; |
91 virtual bool IsFocusable() const OVERRIDE; | 92 virtual bool IsFocusable() const OVERRIDE; |
92 virtual void OnFocus() OVERRIDE; | 93 virtual void OnFocus() OVERRIDE; |
93 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; | 94 virtual void AboutToRequestFocusFromTabTraversal(bool reverse) OVERRIDE; |
94 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 95 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; |
95 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; | 96 virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE; |
96 virtual gfx::Size GetPreferredSize() OVERRIDE; | 97 virtual gfx::Size GetPreferredSize() OVERRIDE; |
97 | 98 |
98 // Overridden from content::WebContentsDelegate: | 99 // Overridden from content::WebContentsDelegate: |
99 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; | 100 virtual void WebContentsFocused(content::WebContents* web_contents) OVERRIDE; |
100 virtual bool EmbedsFullscreenWidget() const OVERRIDE; | 101 virtual bool EmbedsFullscreenWidget() const OVERRIDE; |
101 | 102 |
102 // Overridden from content::WebContentsObserver: | 103 // Overridden from content::WebContentsObserver: |
| 104 virtual void RenderViewDeleted( |
| 105 content::RenderViewHost* render_view_host) OVERRIDE; |
103 virtual void RenderViewHostChanged( | 106 virtual void RenderViewHostChanged( |
104 content::RenderViewHost* old_host, | 107 content::RenderViewHost* old_host, |
105 content::RenderViewHost* new_host) OVERRIDE; | 108 content::RenderViewHost* new_host) OVERRIDE; |
106 virtual void WebContentsDestroyed( | 109 virtual void WebContentsDestroyed( |
107 content::WebContents* web_contents) OVERRIDE; | 110 content::WebContents* web_contents) OVERRIDE; |
108 virtual void DidShowFullscreenWidget(int routing_id) OVERRIDE; | 111 virtual void DidShowFullscreenWidget(int routing_id) OVERRIDE; |
109 virtual void DidDestroyFullscreenWidget(int routing_id) OVERRIDE; | 112 virtual void DidDestroyFullscreenWidget(int routing_id) OVERRIDE; |
110 // Workaround for MSVC++ linker bug/feature that requires | 113 // Workaround for MSVC++ linker bug/feature that requires |
111 // instantiation of the inline IPC::Listener methods in all translation units. | 114 // instantiation of the inline IPC::Listener methods in all translation units. |
112 virtual void OnChannelConnected(int32 peer_id) OVERRIDE {} | 115 virtual void OnChannelConnected(int32 peer_id) OVERRIDE {} |
(...skipping 19 matching lines...) Expand all Loading... |
132 content::BrowserContext* browser_context_; | 135 content::BrowserContext* browser_context_; |
133 bool allow_accelerators_; | 136 bool allow_accelerators_; |
134 gfx::Size preferred_size_; | 137 gfx::Size preferred_size_; |
135 | 138 |
136 DISALLOW_COPY_AND_ASSIGN(WebView); | 139 DISALLOW_COPY_AND_ASSIGN(WebView); |
137 }; | 140 }; |
138 | 141 |
139 } // namespace views | 142 } // namespace views |
140 | 143 |
141 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ | 144 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEBVIEW_H_ |
OLD | NEW |