| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/gfx/platform_canvas.h" | 12 #include "base/gfx/platform_canvas.h" |
| 13 #include "base/gfx/point.h" | 13 #include "base/gfx/point.h" |
| 14 #include "base/gfx/size.h" | 14 #include "base/gfx/size.h" |
| 15 #include "webkit/glue/webdropdata.h" | 15 #include "webkit/glue/webdropdata.h" |
| 16 #include "webkit/glue/webframe_impl.h" | 16 #include "webkit/glue/webframe_impl.h" |
| 17 #include "webkit/glue/webpreferences.h" | 17 #include "webkit/glue/webpreferences.h" |
| 18 #include "webkit/glue/webview.h" | 18 #include "webkit/glue/webview.h" |
| 19 | 19 |
| 20 MSVC_PUSH_WARNING_LEVEL(0); | 20 MSVC_PUSH_WARNING_LEVEL(0); |
| 21 #include "BackForwardList.h" | 21 #include "BackForwardList.h" |
| 22 MSVC_POP_WARNING(); | 22 MSVC_POP_WARNING(); |
| 23 | 23 |
| 24 namespace WebCore { | 24 namespace WebCore { |
| 25 class Frame; | 25 class Frame; |
| 26 class HistoryItem; | 26 class HistoryItem; |
| 27 class KeyboardEvent; | 27 class KeyboardEvent; |
| 28 class Page; | 28 class Page; |
| 29 class PlatformKeyboardEvent; | 29 class PlatformKeyboardEvent; |
| 30 class PopupContainer; |
| 30 class Range; | 31 class Range; |
| 31 class Widget; | 32 class Widget; |
| 32 } | 33 } |
| 33 | 34 |
| 35 class AutocompletePopupMenuClient; |
| 34 class ImageResourceFetcher; | 36 class ImageResourceFetcher; |
| 35 class SearchableFormData; | 37 class SearchableFormData; |
| 36 struct WebDropData; | 38 struct WebDropData; |
| 37 class WebHistoryItemImpl; | 39 class WebHistoryItemImpl; |
| 38 class WebKeyboardEvent; | 40 class WebKeyboardEvent; |
| 39 class WebMouseEvent; | 41 class WebMouseEvent; |
| 40 class WebMouseWheelEvent; | 42 class WebMouseWheelEvent; |
| 41 class WebViewDelegate; | 43 class WebViewDelegate; |
| 42 | 44 |
| 43 class WebViewImpl : public WebView, public WebCore::BackForwardListClient { | 45 class WebViewImpl : public WebView, public WebCore::BackForwardListClient { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 virtual void DragSourceMovedTo( | 91 virtual void DragSourceMovedTo( |
| 90 int client_x, int client_y, int screen_x, int screen_y); | 92 int client_x, int client_y, int screen_x, int screen_y); |
| 91 virtual void DragSourceSystemDragEnded(); | 93 virtual void DragSourceSystemDragEnded(); |
| 92 virtual bool DragTargetDragEnter(const WebDropData& drop_data, | 94 virtual bool DragTargetDragEnter(const WebDropData& drop_data, |
| 93 int client_x, int client_y, int screen_x, int screen_y); | 95 int client_x, int client_y, int screen_x, int screen_y); |
| 94 virtual bool DragTargetDragOver( | 96 virtual bool DragTargetDragOver( |
| 95 int client_x, int client_y, int screen_x, int screen_y); | 97 int client_x, int client_y, int screen_x, int screen_y); |
| 96 virtual void DragTargetDragLeave(); | 98 virtual void DragTargetDragLeave(); |
| 97 virtual void DragTargetDrop( | 99 virtual void DragTargetDrop( |
| 98 int client_x, int client_y, int screen_x, int screen_y); | 100 int client_x, int client_y, int screen_x, int screen_y); |
| 101 virtual void AutofillSuggestionsForNode( |
| 102 int64 node_id, |
| 103 const std::vector<std::wstring>& suggestions, |
| 104 int default_suggestion_index); |
| 99 | 105 |
| 100 // WebViewImpl | 106 // WebViewImpl |
| 101 | 107 |
| 102 const gfx::Size& size() const { return size_; } | 108 const gfx::Size& size() const { return size_; } |
| 103 | 109 |
| 104 const gfx::Point& last_mouse_down_point() const { | 110 const gfx::Point& last_mouse_down_point() const { |
| 105 return last_mouse_down_point_; | 111 return last_mouse_down_point_; |
| 106 } | 112 } |
| 107 | 113 |
| 108 WebCore::Frame* GetFocusedWebCoreFrame(); | 114 WebCore::Frame* GetFocusedWebCoreFrame(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 // Start a system drag and drop operation. | 175 // Start a system drag and drop operation. |
| 170 void StartDragging(const WebDropData& drop_data); | 176 void StartDragging(const WebDropData& drop_data); |
| 171 | 177 |
| 172 virtual const WebCore::Node* getInspectedNode(WebCore::Frame* frame); | 178 virtual const WebCore::Node* getInspectedNode(WebCore::Frame* frame); |
| 173 | 179 |
| 174 // ImageResourceFetcher callback. | 180 // ImageResourceFetcher callback. |
| 175 void ImageResourceDownloadDone(ImageResourceFetcher* fetcher, | 181 void ImageResourceDownloadDone(ImageResourceFetcher* fetcher, |
| 176 bool errored, | 182 bool errored, |
| 177 const SkBitmap& image); | 183 const SkBitmap& image); |
| 178 | 184 |
| 185 // Hides the autocomplete popup if it is showing. |
| 186 void HideAutoCompletePopup(); |
| 187 |
| 179 protected: | 188 protected: |
| 180 friend class WebView; // So WebView::Create can call our constructor | 189 friend class WebView; // So WebView::Create can call our constructor |
| 181 | 190 |
| 182 WebViewImpl(); | 191 WebViewImpl(); |
| 183 ~WebViewImpl(); | 192 ~WebViewImpl(); |
| 184 | 193 |
| 185 void ModifySelection(uint32 message, | 194 void ModifySelection(uint32 message, |
| 186 WebCore::Frame* frame, | 195 WebCore::Frame* frame, |
| 187 const WebCore::PlatformKeyboardEvent& e); | 196 const WebCore::PlatformKeyboardEvent& e); |
| 188 | 197 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 // associated WM_CHAR event if the keydown was handled. We emulate | 287 // associated WM_CHAR event if the keydown was handled. We emulate |
| 279 // this behavior by setting this flag if the keyDown was handled. | 288 // this behavior by setting this flag if the keyDown was handled. |
| 280 bool suppress_next_keypress_event_; | 289 bool suppress_next_keypress_event_; |
| 281 | 290 |
| 282 // The disposition for how this webview is to be initially shown. | 291 // The disposition for how this webview is to be initially shown. |
| 283 WindowOpenDisposition window_open_disposition_; | 292 WindowOpenDisposition window_open_disposition_; |
| 284 | 293 |
| 285 // Represents whether or not this object should process incoming IME events. | 294 // Represents whether or not this object should process incoming IME events. |
| 286 bool ime_accept_events_; | 295 bool ime_accept_events_; |
| 287 | 296 |
| 297 // The currently shown autocomplete popup. |
| 298 RefPtr<WebCore::PopupContainer> autocomplete_popup_; |
| 299 |
| 300 // The popup client of the currently shown autocomplete popup. Necessary for |
| 301 // managing the life of the client. |
| 302 RefPtr<AutocompletePopupMenuClient> autocomplete_popup_client_; |
| 303 |
| 288 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix | 304 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix |
| 289 // WebKit to pass enough information up into ChromeClient::show() so we can | 305 // WebKit to pass enough information up into ChromeClient::show() so we can |
| 290 // decide if the window.open event was caused by a middle-mouse click | 306 // decide if the window.open event was caused by a middle-mouse click |
| 291 public: | 307 public: |
| 292 static const WebInputEvent* current_input_event() { | 308 static const WebInputEvent* current_input_event() { |
| 293 return g_current_input_event; | 309 return g_current_input_event; |
| 294 } | 310 } |
| 295 private: | 311 private: |
| 296 static const WebInputEvent* g_current_input_event; | 312 static const WebInputEvent* g_current_input_event; |
| 297 | 313 |
| 298 DISALLOW_EVIL_CONSTRUCTORS(WebViewImpl); | 314 DISALLOW_EVIL_CONSTRUCTORS(WebViewImpl); |
| 299 }; | 315 }; |
| 300 | 316 |
| 301 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H__ | 317 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H__ |
| 302 | 318 |
| OLD | NEW |