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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 11083002: Allow custom context menus to be requested. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 const webkit::WebPluginInfo& info, 713 const webkit::WebPluginInfo& info,
714 const WebKit::WebPluginParams& params) OVERRIDE; 714 const WebKit::WebPluginParams& params) OVERRIDE;
715 virtual void EvaluateScript(const string16& frame_xpath, 715 virtual void EvaluateScript(const string16& frame_xpath,
716 const string16& jscript, 716 const string16& jscript,
717 int id, 717 int id,
718 bool notify_result) OVERRIDE; 718 bool notify_result) OVERRIDE;
719 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; 719 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE;
720 virtual int GetEnabledBindings() const OVERRIDE; 720 virtual int GetEnabledBindings() const OVERRIDE;
721 virtual bool GetContentStateImmediately() const OVERRIDE; 721 virtual bool GetContentStateImmediately() const OVERRIDE;
722 virtual float GetFilteredTimePerFrame() const OVERRIDE; 722 virtual float GetFilteredTimePerFrame() const OVERRIDE;
723 virtual void ShowContextMenu(WebKit::WebFrame* frame, 723 virtual int ShowContextMenu(
724 const WebKit::WebContextMenuData& data) OVERRIDE; 724 content::ContextMenuClient* client,
725 const content::ContextMenuParams& params) OVERRIDE;
725 virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE; 726 virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE;
726 virtual void RunModalAlertDialog(WebKit::WebFrame* frame, 727 virtual void RunModalAlertDialog(WebKit::WebFrame* frame,
727 const WebKit::WebString& message) OVERRIDE; 728 const WebKit::WebString& message) OVERRIDE;
728 virtual void LoadURLExternally( 729 virtual void LoadURLExternally(
729 WebKit::WebFrame* frame, 730 WebKit::WebFrame* frame,
730 const WebKit::WebURLRequest& request, 731 const WebKit::WebURLRequest& request,
731 WebKit::WebNavigationPolicy policy) OVERRIDE; 732 WebKit::WebNavigationPolicy policy) OVERRIDE;
732 virtual void Repaint(const gfx::Size& size) OVERRIDE; 733 virtual void Repaint(const gfx::Size& size) OVERRIDE;
733 734
734 // webkit_glue::WebPluginPageDelegate implementation ------------------------- 735 // webkit_glue::WebPluginPageDelegate implementation -------------------------
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 GURL focus_url_; 1334 GURL focus_url_;
1334 1335
1335 // The next target URL we want to send to the browser. 1336 // The next target URL we want to send to the browser.
1336 GURL pending_target_url_; 1337 GURL pending_target_url_;
1337 1338
1338 // The text selection the last time DidChangeSelection got called. 1339 // The text selection the last time DidChangeSelection got called.
1339 string16 selection_text_; 1340 string16 selection_text_;
1340 size_t selection_text_offset_; 1341 size_t selection_text_offset_;
1341 ui::Range selection_range_; 1342 ui::Range selection_range_;
1342 1343
1344 // External context menu requests we're waiting for. "Internal"
1345 // (WebKit-originated) context menu events will have an ID of 0 and will not
1346 // be in this map.
1347 //
1348 // We don't want to add internal ones since some of the "special" page
1349 // handlers in the browser process just ignore the context menu requests so
1350 // avoid showing context menus, and so this will cause right clicks to leak
1351 // entries in this map. Most users of the custom context menu (e.g. Pepper
1352 // plugins) are normally only on "regular" pages and the regular pages will
1353 // always respond properly to the request, so we don't have to worry so
1354 // much about leaks.
1355 IDMap<content::ContextMenuClient, IDMapExternalPointer>
1356 pending_context_menus_;
1357
1343 // View ---------------------------------------------------------------------- 1358 // View ----------------------------------------------------------------------
1344 1359
1345 // Cache the preferred size of the page in order to prevent sending the IPC 1360 // Cache the preferred size of the page in order to prevent sending the IPC
1346 // when layout() recomputes but doesn't actually change sizes. 1361 // when layout() recomputes but doesn't actually change sizes.
1347 gfx::Size preferred_size_; 1362 gfx::Size preferred_size_;
1348 1363
1349 // Used to delay determining the preferred size (to avoid intermediate 1364 // Used to delay determining the preferred size (to avoid intermediate
1350 // states for the sizes). 1365 // states for the sizes).
1351 base::OneShotTimer<RenderViewImpl> check_preferred_size_timer_; 1366 base::OneShotTimer<RenderViewImpl> check_preferred_size_timer_;
1352 1367
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1574 // bunch of stuff, you should probably create a helper class and put your 1589 // bunch of stuff, you should probably create a helper class and put your
1575 // data and methods on that to avoid bloating RenderView more. You can 1590 // data and methods on that to avoid bloating RenderView more. You can
1576 // use the Observer interface to filter IPC messages and receive frame change 1591 // use the Observer interface to filter IPC messages and receive frame change
1577 // notifications. 1592 // notifications.
1578 // --------------------------------------------------------------------------- 1593 // ---------------------------------------------------------------------------
1579 1594
1580 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1595 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1581 }; 1596 };
1582 1597
1583 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1598 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698