Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: webkit/glue/webview_impl.h

Issue 42377: Do correct hit testing for context menu items in WebViewImpl. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | webkit/glue/webview_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/point.h" 12 #include "base/gfx/point.h"
13 #include "base/gfx/size.h" 13 #include "base/gfx/size.h"
14 #include "skia/ext/platform_canvas.h" 14 #include "skia/ext/platform_canvas.h"
15 #include "webkit/glue/back_forward_list_client_impl.h" 15 #include "webkit/glue/back_forward_list_client_impl.h"
16 #include "webkit/glue/webdropdata.h" 16 #include "webkit/glue/webdropdata.h"
17 #include "webkit/glue/webframe_impl.h" 17 #include "webkit/glue/webframe_impl.h"
18 #include "webkit/glue/webpreferences.h" 18 #include "webkit/glue/webpreferences.h"
19 #include "webkit/glue/webview.h" 19 #include "webkit/glue/webview.h"
20 20
21 MSVC_PUSH_WARNING_LEVEL(0); 21 MSVC_PUSH_WARNING_LEVEL(0);
22 #include "Page.h" 22 #include "Page.h"
23 MSVC_POP_WARNING(); 23 MSVC_POP_WARNING();
24 24
25 namespace WebCore { 25 namespace WebCore {
26 class ChromiumDataObject; 26 class ChromiumDataObject;
27 class Frame; 27 class Frame;
28 class HistoryItem; 28 class HistoryItem;
29 class HitTestResult;
29 class KeyboardEvent; 30 class KeyboardEvent;
30 class Page; 31 class Page;
31 class PlatformKeyboardEvent; 32 class PlatformKeyboardEvent;
32 class PopupContainer; 33 class PopupContainer;
33 class Range; 34 class Range;
34 class Widget; 35 class Widget;
35 } 36 }
36 37
37 class AutocompletePopupMenuClient; 38 class AutocompletePopupMenuClient;
38 class ImageResourceFetcher; 39 class ImageResourceFetcher;
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // Returns true if the autocomple has consumed the event. 257 // Returns true if the autocomple has consumed the event.
257 bool AutocompleteHandleKeyEvent(const WebKeyboardEvent& event); 258 bool AutocompleteHandleKeyEvent(const WebKeyboardEvent& event);
258 259
259 // Returns true if the view was scrolled. 260 // Returns true if the view was scrolled.
260 bool ScrollViewWithKeyboard(int key_code); 261 bool ScrollViewWithKeyboard(int key_code);
261 262
262 // Removes fetcher from the set of pending image fetchers and deletes it. 263 // Removes fetcher from the set of pending image fetchers and deletes it.
263 // This is invoked after the download is completed (or fails). 264 // This is invoked after the download is completed (or fails).
264 void DeleteImageResourceFetcher(ImageResourceFetcher* fetcher); 265 void DeleteImageResourceFetcher(ImageResourceFetcher* fetcher);
265 266
267 // Converts |pos| from window coordinates to contents coordinates and gets
268 // the HitTestResult for it.
269 WebCore::HitTestResult HitTestResultForWindowPos(
270 const WebCore::IntPoint& pos);
271
266 // Returns the currently focused Node or NULL if no node has focus. 272 // Returns the currently focused Node or NULL if no node has focus.
267 WebCore::Node* GetFocusedNode(); 273 WebCore::Node* GetFocusedNode();
268 274
269 // ImageResourceFetchers schedule via DownloadImage. 275 // ImageResourceFetchers schedule via DownloadImage.
270 std::set<ImageResourceFetcher*> image_fetchers_; 276 std::set<ImageResourceFetcher*> image_fetchers_;
271 277
272 // The point relative to the client area where the mouse was last pressed 278 // The point relative to the client area where the mouse was last pressed
273 // down. This is used by the drag client to determine what was under the 279 // down. This is used by the drag client to determine what was under the
274 // mouse when the drag was initiated. We need to track this here in 280 // mouse when the drag was initiated. We need to track this here in
275 // WebViewImpl since DragClient::startDrag does not pass the position the 281 // WebViewImpl since DragClient::startDrag does not pass the position the
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix 327 // HACK: current_input_event is for ChromeClientImpl::show(), until we can fix
322 // WebKit to pass enough information up into ChromeClient::show() so we can 328 // WebKit to pass enough information up into ChromeClient::show() so we can
323 // decide if the window.open event was caused by a middle-mouse click 329 // decide if the window.open event was caused by a middle-mouse click
324 public: 330 public:
325 static const WebInputEvent* current_input_event() { 331 static const WebInputEvent* current_input_event() {
326 return g_current_input_event; 332 return g_current_input_event;
327 } 333 }
328 private: 334 private:
329 static const WebInputEvent* g_current_input_event; 335 static const WebInputEvent* g_current_input_event;
330 336
331 DISALLOW_EVIL_CONSTRUCTORS(WebViewImpl); 337 DISALLOW_COPY_AND_ASSIGN(WebViewImpl);
332 }; 338 };
333 339
334 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H__ 340 #endif // WEBKIT_GLUE_WEBVIEW_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/webview_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698