| 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> |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 virtual bool handleCompositionEvent(WebKit::WebCompositionCommand command, | 74 virtual bool handleCompositionEvent(WebKit::WebCompositionCommand command, |
| 75 int cursor_position, | 75 int cursor_position, |
| 76 int target_start, | 76 int target_start, |
| 77 int target_end, | 77 int target_end, |
| 78 const WebKit::WebString& text); | 78 const WebKit::WebString& text); |
| 79 virtual bool queryCompositionStatus(bool* enabled, | 79 virtual bool queryCompositionStatus(bool* enabled, |
| 80 WebKit::WebRect* caret_rect); | 80 WebKit::WebRect* caret_rect); |
| 81 virtual void setTextDirection(WebKit::WebTextDirection direction); | 81 virtual void setTextDirection(WebKit::WebTextDirection direction); |
| 82 | 82 |
| 83 // WebView methods: | 83 // WebView methods: |
| 84 virtual void initializeMainFrame(WebKit::WebFrameClient*); | |
| 85 virtual WebKit::WebSettings* settings(); | 84 virtual WebKit::WebSettings* settings(); |
| 86 virtual WebKit::WebString pageEncoding() const; | 85 virtual WebKit::WebString pageEncoding() const; |
| 87 virtual void setPageEncoding(const WebKit::WebString& encoding); | 86 virtual void setPageEncoding(const WebKit::WebString& encoding); |
| 88 virtual bool isTransparent() const; | |
| 89 virtual void setIsTransparent(bool value); | |
| 90 virtual bool tabsToLinks() const; | |
| 91 virtual void setTabsToLinks(bool value); | |
| 92 virtual bool tabKeyCyclesThroughElements() const; | |
| 93 virtual void setTabKeyCyclesThroughElements(bool value); | |
| 94 virtual bool isActive() const; | |
| 95 virtual void setIsActive(bool value); | |
| 96 virtual bool dispatchBeforeUnloadEvent(); | 87 virtual bool dispatchBeforeUnloadEvent(); |
| 97 virtual void dispatchUnloadEvent(); | 88 virtual void dispatchUnloadEvent(); |
| 98 virtual WebKit::WebFrame* mainFrame(); | 89 virtual WebKit::WebFrame* mainFrame(); |
| 99 virtual WebKit::WebFrame* findFrameByName( | 90 virtual WebKit::WebFrame* findFrameByName( |
| 100 const WebKit::WebString& name, WebKit::WebFrame* relative_to_frame); | 91 const WebKit::WebString& name, WebKit::WebFrame* relative_to_frame); |
| 101 virtual WebKit::WebFrame* focusedFrame(); | 92 virtual WebKit::WebFrame* focusedFrame(); |
| 102 virtual void setFocusedFrame(WebKit::WebFrame* frame); | 93 virtual void setFocusedFrame(WebKit::WebFrame* frame); |
| 103 virtual void setInitialFocus(bool reverse); | 94 virtual void setInitialFocus(bool reverse); |
| 104 virtual void clearFocusedNode(); | 95 virtual void clearFocusedNode(); |
| 105 virtual void zoomIn(bool text_only); | 96 virtual void zoomIn(bool text_only); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 121 WebKit::WebDragOperationsMask operations_allowed); | 112 WebKit::WebDragOperationsMask operations_allowed); |
| 122 virtual WebKit::WebDragOperation dragTargetDragOver( | 113 virtual WebKit::WebDragOperation dragTargetDragOver( |
| 123 const WebKit::WebPoint& client_point, | 114 const WebKit::WebPoint& client_point, |
| 124 const WebKit::WebPoint& screen_point, | 115 const WebKit::WebPoint& screen_point, |
| 125 WebKit::WebDragOperationsMask operations_allowed); | 116 WebKit::WebDragOperationsMask operations_allowed); |
| 126 virtual void dragTargetDragLeave(); | 117 virtual void dragTargetDragLeave(); |
| 127 virtual void dragTargetDrop( | 118 virtual void dragTargetDrop( |
| 128 const WebKit::WebPoint& client_point, | 119 const WebKit::WebPoint& client_point, |
| 129 const WebKit::WebPoint& screen_point); | 120 const WebKit::WebPoint& screen_point); |
| 130 virtual int dragIdentity(); | 121 virtual int dragIdentity(); |
| 131 virtual bool setDropEffect(bool accept); | |
| 132 virtual void inspectElementAt(const WebKit::WebPoint& point); | 122 virtual void inspectElementAt(const WebKit::WebPoint& point); |
| 133 | 123 |
| 134 // WebView methods: | 124 // WebView methods: |
| 125 virtual void InitializeMainFrame(WebKit::WebFrameClient* frame_client); |
| 135 virtual WebViewDelegate* GetDelegate(); | 126 virtual WebViewDelegate* GetDelegate(); |
| 127 virtual void SetTabKeyCyclesThroughElements(bool value); |
| 128 virtual WebKit::WebFrame* GetPreviousFrameBefore(WebKit::WebFrame* frame, |
| 129 bool wrap); |
| 130 virtual WebKit::WebFrame* GetNextFrameAfter(WebKit::WebFrame* frame, |
| 131 bool wrap); |
| 132 virtual void StopLoading(); |
| 133 virtual void SetBackForwardListSize(int size); |
| 136 virtual const std::wstring& GetInspectorSettings() const; | 134 virtual const std::wstring& GetInspectorSettings() const; |
| 137 virtual void SetInspectorSettings(const std::wstring& settings); | 135 virtual void SetInspectorSettings(const std::wstring& settings); |
| 136 virtual void ShowJavaScriptConsole(); |
| 137 virtual bool SetDropEffect(bool accept); |
| 138 virtual void AutofillSuggestionsForNode( | 138 virtual void AutofillSuggestionsForNode( |
| 139 int64 node_id, | 139 int64 node_id, |
| 140 const std::vector<std::wstring>& suggestions, | 140 const std::vector<std::wstring>& suggestions, |
| 141 int default_suggestion_index); | 141 int default_suggestion_index); |
| 142 virtual void HideAutofillPopup(); | 142 virtual void HideAutofillPopup(); |
| 143 virtual void SetIgnoreInputEvents(bool new_value); | 143 virtual void SetIgnoreInputEvents(bool new_value); |
| 144 |
| 144 virtual WebDevToolsAgent* GetWebDevToolsAgent(); | 145 virtual WebDevToolsAgent* GetWebDevToolsAgent(); |
| 145 WebDevToolsAgentImpl* GetWebDevToolsAgentImpl(); | 146 WebDevToolsAgentImpl* GetWebDevToolsAgentImpl(); |
| 147 |
| 148 virtual void SetIsTransparent(bool is_transparent); |
| 149 virtual bool GetIsTransparent() const; |
| 150 |
| 146 virtual void MediaPlayerActionAt(int x, | 151 virtual void MediaPlayerActionAt(int x, |
| 147 int y, | 152 int y, |
| 148 const MediaPlayerAction& action); | 153 const MediaPlayerAction& action); |
| 149 | 154 |
| 155 virtual void SetActive(bool active); |
| 156 virtual bool IsActive(); |
| 157 |
| 150 // WebViewImpl | 158 // WebViewImpl |
| 151 | 159 |
| 152 const WebKit::WebPoint& last_mouse_down_point() const { | 160 const WebKit::WebPoint& last_mouse_down_point() const { |
| 153 return last_mouse_down_point_; | 161 return last_mouse_down_point_; |
| 154 } | 162 } |
| 155 | 163 |
| 156 WebCore::Frame* GetFocusedWebCoreFrame(); | 164 WebCore::Frame* GetFocusedWebCoreFrame(); |
| 157 | 165 |
| 158 // Returns the currently focused Node or NULL if no node has focus. | 166 // Returns the currently focused Node or NULL if no node has focus. |
| 159 WebCore::Node* GetFocusedNode(); | 167 WebCore::Node* GetFocusedNode(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void HideAutoCompletePopup(); | 243 void HideAutoCompletePopup(); |
| 236 void AutoCompletePopupDidHide(); | 244 void AutoCompletePopupDidHide(); |
| 237 | 245 |
| 238 // Converts |x|, |y| from window coordinates to contents coordinates and gets | 246 // Converts |x|, |y| from window coordinates to contents coordinates and gets |
| 239 // the underlying Node for them. | 247 // the underlying Node for them. |
| 240 WebCore::Node* GetNodeForWindowPos(int x, int y); | 248 WebCore::Node* GetNodeForWindowPos(int x, int y); |
| 241 | 249 |
| 242 virtual void SetSpellingPanelVisibility(bool is_visible); | 250 virtual void SetSpellingPanelVisibility(bool is_visible); |
| 243 virtual bool GetSpellingPanelVisibility(); | 251 virtual bool GetSpellingPanelVisibility(); |
| 244 | 252 |
| 253 virtual void SetTabsToLinks(bool enable); |
| 254 virtual bool GetTabsToLinks() const; |
| 255 |
| 245 #if ENABLE(NOTIFICATIONS) | 256 #if ENABLE(NOTIFICATIONS) |
| 246 // Returns the provider of desktop notifications. | 257 // Returns the provider of desktop notifications. |
| 247 WebKit::NotificationPresenterImpl* GetNotificationPresenter(); | 258 WebKit::NotificationPresenterImpl* GetNotificationPresenter(); |
| 248 #endif | 259 #endif |
| 249 | 260 |
| 250 // Tries to scroll a frame or any parent of a frame. Returns true if the view | 261 // Tries to scroll a frame or any parent of a frame. Returns true if the view |
| 251 // was scrolled. | 262 // was scrolled. |
| 252 bool PropagateScroll(WebCore::ScrollDirection scroll_direction, | 263 bool PropagateScroll(WebCore::ScrollDirection scroll_direction, |
| 253 WebCore::ScrollGranularity scroll_granularity); | 264 WebCore::ScrollGranularity scroll_granularity); |
| 254 | 265 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 static const WebKit::WebInputEvent* current_input_event() { | 419 static const WebKit::WebInputEvent* current_input_event() { |
| 409 return g_current_input_event; | 420 return g_current_input_event; |
| 410 } | 421 } |
| 411 private: | 422 private: |
| 412 static const WebKit::WebInputEvent* g_current_input_event; | 423 static const WebKit::WebInputEvent* g_current_input_event; |
| 413 | 424 |
| 414 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); | 425 DISALLOW_COPY_AND_ASSIGN(WebViewImpl); |
| 415 }; | 426 }; |
| 416 | 427 |
| 417 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ | 428 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_ |
| OLD | NEW |