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 "webkit/port/history/BackForwardList.h" | 21 #include "webkit/port/history/BackForwardList.h" |
22 #include "webkit/port/platform/WidgetClientWin.h" | 22 #include "webkit/port/platform/WidgetClientWin.h" |
23 MSVC_POP_WARNING(); | 23 MSVC_POP_WARNING(); |
24 | 24 |
25 namespace WebCore { | 25 namespace WebCore { |
26 class Frame; | 26 class Frame; |
27 class HistoryItem; | 27 class HistoryItem; |
28 class KeyboardEvent; | 28 class KeyboardEvent; |
29 class Page; | 29 class Page; |
30 class PlatformKeyboardEvent; | 30 class PlatformKeyboardEvent; |
31 class Range; | 31 class Range; |
32 class Widget; | 32 class Widget; |
33 } | 33 } |
34 | 34 |
35 class ImageResourceFetcher; | 35 class ImageResourceFetcher; |
36 class SearchableFormData; | 36 class SearchableFormData; |
37 struct WebDropData; | 37 struct WebDropData; |
38 class WebHistoryItemImpl; | 38 class WebHistoryItemImpl; |
39 class WebKeyboardEvent; | 39 class WebKeyboardEvent; |
40 class WebMouseEvent; | 40 class WebMouseEvent; |
41 class WebMouseWheelEvent; | 41 class WebMouseWheelEvent; |
42 class WebViewDelegate; | 42 class WebViewDelegate; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 virtual void StopLoading(); | 74 virtual void StopLoading(); |
75 virtual void SetBackForwardListSize(int size); | 75 virtual void SetBackForwardListSize(int size); |
76 virtual void RestoreFocus(); | 76 virtual void RestoreFocus(); |
77 virtual void SetInitialFocus(bool reverse); | 77 virtual void SetInitialFocus(bool reverse); |
78 virtual bool FocusedFrameNeedsSpellchecking(); | 78 virtual bool FocusedFrameNeedsSpellchecking(); |
79 virtual bool DownloadImage(int id, const GURL& image_url, int image_size); | 79 virtual bool DownloadImage(int id, const GURL& image_url, int image_size); |
80 virtual void SetPreferences(const WebPreferences& preferences); | 80 virtual void SetPreferences(const WebPreferences& preferences); |
81 virtual const WebPreferences& GetPreferences(); | 81 virtual const WebPreferences& GetPreferences(); |
82 virtual void SetPageEncoding(const std::wstring& encoding_name); | 82 virtual void SetPageEncoding(const std::wstring& encoding_name); |
83 virtual std::wstring GetMainFrameEncodingName(); | 83 virtual std::wstring GetMainFrameEncodingName(); |
84 virtual void MakeTextLarger(); | 84 virtual void ZoomIn(bool text_only); |
85 virtual void MakeTextSmaller(); | 85 virtual void ZoomOut(bool text_only); |
86 virtual void MakeTextStandardSize(); | 86 virtual void ResetZoom(); |
87 virtual void CopyImageAt(int x, int y); | 87 virtual void CopyImageAt(int x, int y); |
88 virtual void InspectElement(int x, int y); | 88 virtual void InspectElement(int x, int y); |
89 virtual void ShowJavaScriptConsole(); | 89 virtual void ShowJavaScriptConsole(); |
90 virtual void DragSourceEndedAt( | 90 virtual void DragSourceEndedAt( |
91 int client_x, int client_y, int screen_x, int screen_y); | 91 int client_x, int client_y, int screen_x, int screen_y); |
92 virtual void DragSourceMovedTo( | 92 virtual void DragSourceMovedTo( |
93 int client_x, int client_y, int screen_x, int screen_y); | 93 int client_x, int client_y, int screen_x, int screen_y); |
94 virtual void DragSourceSystemDragEnded(); | 94 virtual void DragSourceSystemDragEnded(); |
95 virtual bool DragTargetDragEnter(const WebDropData& drop_data, | 95 virtual bool DragTargetDragEnter(const WebDropData& drop_data, |
96 int client_x, int client_y, int screen_x, int screen_y); | 96 int client_x, int client_y, int screen_x, int screen_y); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // The point relative to the client area where the mouse was last pressed | 268 // The point relative to the client area where the mouse was last pressed |
269 // down. This is used by the drag client to determine what was under the | 269 // down. This is used by the drag client to determine what was under the |
270 // mouse when the drag was initiated. We need to track this here in | 270 // mouse when the drag was initiated. We need to track this here in |
271 // WebViewImpl since DragClient::startDrag does not pass the position the | 271 // WebViewImpl since DragClient::startDrag does not pass the position the |
272 // mouse was at when the drag was initiated, only the current point, which | 272 // mouse was at when the drag was initiated, only the current point, which |
273 // can be misleading as it is usually not over the element the user actually | 273 // can be misleading as it is usually not over the element the user actually |
274 // dragged by the time a drag is initiated. | 274 // dragged by the time a drag is initiated. |
275 gfx::Point last_mouse_down_point_; | 275 gfx::Point last_mouse_down_point_; |
276 | 276 |
277 // Keeps track of the current text zoom level. 0 means no zoom, positive | 277 // Keeps track of the current text zoom level. 0 means no zoom, positive |
278 // values mean larger text, negative numbers mean smaller text. | 278 // values mean larger text, negative numbers mean smaller. |
279 int text_zoom_level_; | 279 int zoom_level_; |
280 | 280 |
281 bool context_menu_allowed_; | 281 bool context_menu_allowed_; |
282 | 282 |
283 bool doing_drag_and_drop_; | 283 bool doing_drag_and_drop_; |
284 | 284 |
285 // Webkit expects keyPress events to be suppressed if the associated keyDown | 285 // Webkit expects keyPress events to be suppressed if the associated keyDown |
286 // event was handled. Safari implements this behavior by peeking out the | 286 // event was handled. Safari implements this behavior by peeking out the |
287 // associated WM_CHAR event if the keydown was handled. We emulate | 287 // associated WM_CHAR event if the keydown was handled. We emulate |
288 // this behavior by setting this flag if the keyDown was handled. | 288 // this behavior by setting this flag if the keyDown was handled. |
289 bool suppress_next_keypress_event_; | 289 bool suppress_next_keypress_event_; |
(...skipping 12 matching lines...) Expand all Loading... |
302 return g_current_input_event; | 302 return g_current_input_event; |
303 } | 303 } |
304 private: | 304 private: |
305 static const WebInputEvent* g_current_input_event; | 305 static const WebInputEvent* g_current_input_event; |
306 | 306 |
307 DISALLOW_EVIL_CONSTRUCTORS(WebViewImpl); | 307 DISALLOW_EVIL_CONSTRUCTORS(WebViewImpl); |
308 }; | 308 }; |
309 | 309 |
310 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H__ | 310 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H__ |
311 | 311 |
OLD | NEW |