OLD | NEW |
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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 const webkit::WebPluginInfo& info, | 708 const webkit::WebPluginInfo& info, |
709 const WebKit::WebPluginParams& params) OVERRIDE; | 709 const WebKit::WebPluginParams& params) OVERRIDE; |
710 virtual void EvaluateScript(const string16& frame_xpath, | 710 virtual void EvaluateScript(const string16& frame_xpath, |
711 const string16& jscript, | 711 const string16& jscript, |
712 int id, | 712 int id, |
713 bool notify_result) OVERRIDE; | 713 bool notify_result) OVERRIDE; |
714 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; | 714 virtual bool ShouldDisplayScrollbars(int width, int height) const OVERRIDE; |
715 virtual int GetEnabledBindings() const OVERRIDE; | 715 virtual int GetEnabledBindings() const OVERRIDE; |
716 virtual bool GetContentStateImmediately() const OVERRIDE; | 716 virtual bool GetContentStateImmediately() const OVERRIDE; |
717 virtual float GetFilteredTimePerFrame() const OVERRIDE; | 717 virtual float GetFilteredTimePerFrame() const OVERRIDE; |
718 virtual void ShowContextMenu(WebKit::WebFrame* frame, | 718 virtual int ShowContextMenu( |
719 const WebKit::WebContextMenuData& data) OVERRIDE; | 719 content::ContextMenuClient* client, |
| 720 const content::ContextMenuParams& params) OVERRIDE; |
720 virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE; | 721 virtual WebKit::WebPageVisibilityState GetVisibilityState() const OVERRIDE; |
721 virtual void RunModalAlertDialog(WebKit::WebFrame* frame, | 722 virtual void RunModalAlertDialog(WebKit::WebFrame* frame, |
722 const WebKit::WebString& message) OVERRIDE; | 723 const WebKit::WebString& message) OVERRIDE; |
723 virtual void LoadURLExternally( | 724 virtual void LoadURLExternally( |
724 WebKit::WebFrame* frame, | 725 WebKit::WebFrame* frame, |
725 const WebKit::WebURLRequest& request, | 726 const WebKit::WebURLRequest& request, |
726 WebKit::WebNavigationPolicy policy) OVERRIDE; | 727 WebKit::WebNavigationPolicy policy) OVERRIDE; |
727 virtual void Repaint(const gfx::Size& size) OVERRIDE; | 728 virtual void Repaint(const gfx::Size& size) OVERRIDE; |
728 | 729 |
729 // webkit_glue::WebPluginPageDelegate implementation ------------------------- | 730 // webkit_glue::WebPluginPageDelegate implementation ------------------------- |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |