| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 5 #ifndef WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| 6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 6 #define WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "Page.h" | 12 #include "Page.h" |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "skia/ext/platform_canvas.h" | 16 #include "skia/ext/platform_canvas.h" |
| 17 #include "webkit/api/public/WebPoint.h" | 17 #include "webkit/api/public/WebPoint.h" |
| 18 #include "webkit/api/public/WebSize.h" | 18 #include "webkit/api/public/WebSize.h" |
| 19 #include "webkit/api/public/WebString.h" |
| 19 #include "webkit/api/src/NotificationPresenterImpl.h" | 20 #include "webkit/api/src/NotificationPresenterImpl.h" |
| 20 #include "webkit/glue/back_forward_list_client_impl.h" | 21 #include "webkit/glue/back_forward_list_client_impl.h" |
| 21 #include "webkit/glue/chrome_client_impl.h" | 22 #include "webkit/glue/chrome_client_impl.h" |
| 22 #include "webkit/glue/context_menu_client_impl.h" | 23 #include "webkit/glue/context_menu_client_impl.h" |
| 23 #include "webkit/glue/dragclient_impl.h" | 24 #include "webkit/glue/dragclient_impl.h" |
| 24 #include "webkit/glue/editor_client_impl.h" | 25 #include "webkit/glue/editor_client_impl.h" |
| 25 #include "webkit/glue/inspector_client_impl.h" | 26 #include "webkit/glue/inspector_client_impl.h" |
| 26 #include "webkit/glue/webframe_impl.h" | 27 #include "webkit/glue/webframe_impl.h" |
| 27 #include "webkit/glue/webpreferences.h" | 28 #include "webkit/glue/webpreferences.h" |
| 28 #include "webkit/glue/webview.h" | 29 #include "webkit/glue/webview.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 const WebKit::WebPoint& client_point, | 124 const WebKit::WebPoint& client_point, |
| 124 const WebKit::WebPoint& screen_point, | 125 const WebKit::WebPoint& screen_point, |
| 125 WebKit::WebDragOperationsMask operations_allowed); | 126 WebKit::WebDragOperationsMask operations_allowed); |
| 126 virtual void dragTargetDragLeave(); | 127 virtual void dragTargetDragLeave(); |
| 127 virtual void dragTargetDrop( | 128 virtual void dragTargetDrop( |
| 128 const WebKit::WebPoint& client_point, | 129 const WebKit::WebPoint& client_point, |
| 129 const WebKit::WebPoint& screen_point); | 130 const WebKit::WebPoint& screen_point); |
| 130 virtual int dragIdentity(); | 131 virtual int dragIdentity(); |
| 131 virtual bool setDropEffect(bool accept); | 132 virtual bool setDropEffect(bool accept); |
| 132 virtual void inspectElementAt(const WebKit::WebPoint& point); | 133 virtual void inspectElementAt(const WebKit::WebPoint& point); |
| 134 virtual WebKit::WebString inspectorSettings() const; |
| 135 virtual void setInspectorSettings(const WebKit::WebString& settings); |
| 133 | 136 |
| 134 // WebView methods: | 137 // WebView methods: |
| 135 virtual WebViewDelegate* GetDelegate(); | 138 virtual WebViewDelegate* GetDelegate(); |
| 136 virtual const std::wstring& GetInspectorSettings() const; | |
| 137 virtual void SetInspectorSettings(const std::wstring& settings); | |
| 138 virtual void AutofillSuggestionsForNode( | 139 virtual void AutofillSuggestionsForNode( |
| 139 int64 node_id, | 140 int64 node_id, |
| 140 const std::vector<std::wstring>& suggestions, | 141 const std::vector<std::wstring>& suggestions, |
| 141 int default_suggestion_index); | 142 int default_suggestion_index); |
| 142 virtual void HideAutofillPopup(); | 143 virtual void HideAutofillPopup(); |
| 143 virtual void SetIgnoreInputEvents(bool new_value); | 144 virtual void SetIgnoreInputEvents(bool new_value); |
| 144 virtual WebDevToolsAgent* GetWebDevToolsAgent(); | 145 virtual WebDevToolsAgent* GetWebDevToolsAgent(); |
| 145 WebDevToolsAgentImpl* GetWebDevToolsAgentImpl(); | 146 WebDevToolsAgentImpl* GetWebDevToolsAgentImpl(); |
| 146 virtual void MediaPlayerActionAt(int x, | 147 virtual void MediaPlayerActionAt(int x, |
| 147 int y, | 148 int y, |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 WebKit::WebDragOperationsMask drag_source_operation_mask); | 243 WebKit::WebDragOperationsMask drag_source_operation_mask); |
| 243 | 244 |
| 244 // Hides the autocomplete popup if it is showing. | 245 // Hides the autocomplete popup if it is showing. |
| 245 void HideAutoCompletePopup(); | 246 void HideAutoCompletePopup(); |
| 246 void AutoCompletePopupDidHide(); | 247 void AutoCompletePopupDidHide(); |
| 247 | 248 |
| 248 // Converts |x|, |y| from window coordinates to contents coordinates and gets | 249 // Converts |x|, |y| from window coordinates to contents coordinates and gets |
| 249 // the underlying Node for them. | 250 // the underlying Node for them. |
| 250 WebCore::Node* GetNodeForWindowPos(int x, int y); | 251 WebCore::Node* GetNodeForWindowPos(int x, int y); |
| 251 | 252 |
| 252 virtual void SetSpellingPanelVisibility(bool is_visible); | |
| 253 virtual bool GetSpellingPanelVisibility(); | |
| 254 | |
| 255 #if ENABLE(NOTIFICATIONS) | 253 #if ENABLE(NOTIFICATIONS) |
| 256 // Returns the provider of desktop notifications. | 254 // Returns the provider of desktop notifications. |
| 257 WebKit::NotificationPresenterImpl* GetNotificationPresenter(); | 255 WebKit::NotificationPresenterImpl* GetNotificationPresenter(); |
| 258 #endif | 256 #endif |
| 259 | 257 |
| 260 // Tries to scroll a frame or any parent of a frame. Returns true if the view | 258 // Tries to scroll a frame or any parent of a frame. Returns true if the view |
| 261 // was scrolled. | 259 // was scrolled. |
| 262 bool PropagateScroll(WebCore::ScrollDirection scroll_direction, | 260 bool PropagateScroll(WebCore::ScrollDirection scroll_direction, |
| 263 WebCore::ScrollGranularity scroll_granularity); | 261 WebCore::ScrollGranularity scroll_granularity); |
| 264 | 262 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 bool autocomplete_popup_showing_; | 388 bool autocomplete_popup_showing_; |
| 391 | 389 |
| 392 // The autocomplete client. | 390 // The autocomplete client. |
| 393 scoped_ptr<AutocompletePopupMenuClient> autocomplete_popup_client_; | 391 scoped_ptr<AutocompletePopupMenuClient> autocomplete_popup_client_; |
| 394 | 392 |
| 395 scoped_ptr<WebDevToolsAgentImpl> devtools_agent_; | 393 scoped_ptr<WebDevToolsAgentImpl> devtools_agent_; |
| 396 | 394 |
| 397 // Whether the webview is rendering transparently. | 395 // Whether the webview is rendering transparently. |
| 398 bool is_transparent_; | 396 bool is_transparent_; |
| 399 | 397 |
| 400 // Whether the spelling panel is currently being displayed or not. | |
| 401 bool spelling_panel_is_visible_; | |
| 402 | |
| 403 // Whether the user can press tab to focus links. | 398 // Whether the user can press tab to focus links. |
| 404 bool tabs_to_links_; | 399 bool tabs_to_links_; |
| 405 | 400 |
| 406 // Inspector settings. | 401 // Inspector settings. |
| 407 std::wstring inspector_settings_; | 402 WebKit::WebString inspector_settings_; |
| 408 | 403 |
| 409 #if ENABLE(NOTIFICATIONS) | 404 #if ENABLE(NOTIFICATIONS) |
| 410 // The provider of desktop notifications; | 405 // The provider of desktop notifications; |
| 411 WebKit::NotificationPresenterImpl notification_presenter_; | 406 WebKit::NotificationPresenterImpl notification_presenter_; |
| 412 #endif | 407 #endif |
| 413 | 408 |
| 414 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix | 409 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix |
| 415 // WebKit to pass enough information up into ChromeClient::show() so we can | 410 // WebKit to pass enough information up into ChromeClient::show() so we can |
| 416 // decide if the window.open event was caused by a middle-mouse click | 411 // decide if the window.open event was caused by a middle-mouse click |
| 417 public: | 412 public: |
| 418 static const WebKit::WebInputEvent* current_input_event() { | 413 static const WebKit::WebInputEvent* current_input_event() { |
| 419 return g_current_input_event; | 414 return g_current_input_event; |
| 420 } | 415 } |
| 421 private: | 416 private: |
| 422 static const WebKit::WebInputEvent* g_current_input_event; | 417 static const WebKit::WebInputEvent* g_current_input_event; |
| 423 | 418 |
| 424 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); | 419 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); |
| 425 }; | 420 }; |
| 426 | 421 |
| 427 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 422 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| OLD | NEW |