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

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

Issue 1449353002: OOPIF: Set timer for per-frame UpdateState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_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) 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 // Notification that the given plugin is focused or unfocused. 284 // Notification that the given plugin is focused or unfocused.
285 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused); 285 void PepperFocusChanged(PepperPluginInstanceImpl* instance, bool focused);
286 286
287 void RegisterPluginDelegate(WebPluginDelegateProxy* delegate); 287 void RegisterPluginDelegate(WebPluginDelegateProxy* delegate);
288 void UnregisterPluginDelegate(WebPluginDelegateProxy* delegate); 288 void UnregisterPluginDelegate(WebPluginDelegateProxy* delegate);
289 #endif // ENABLE_PLUGINS 289 #endif // ENABLE_PLUGINS
290 290
291 void TransferActiveWheelFlingAnimation( 291 void TransferActiveWheelFlingAnimation(
292 const blink::WebActiveWheelFlingParameters& params); 292 const blink::WebActiveWheelFlingParameters& params);
293 293
294 // Starts a timer to send an UpdateState message on behalf of |frame|, if the
295 // timer isn't already running. This allows multiple state changing events to
296 // be coalesced into one update.
297 void StartNavStateSyncTimerIfNecessary(RenderFrameImpl* frame);
298
294 // Synchronously sends the current navigation state to the browser. 299 // Synchronously sends the current navigation state to the browser.
295 void SendUpdateState(); 300 void SendUpdateState();
296 301
297 // Returns the length of the session history of this RenderView. Note that 302 // Returns the length of the session history of this RenderView. Note that
298 // this only coincides with the actual length of the session history if this 303 // this only coincides with the actual length of the session history if this
299 // RenderView is the currently active RenderView of a WebContents. 304 // RenderView is the currently active RenderView of a WebContents.
300 unsigned GetLocalSessionHistoryLengthForTesting() const; 305 unsigned GetLocalSessionHistoryLengthForTesting() const;
301 306
302 // Invokes OnSetFocus and marks the widget as active depending on the value 307 // Invokes OnSetFocus and marks the widget as active depending on the value
303 // of |enable|. This is used for layout tests that need to control the focus 308 // of |enable|. This is used for layout tests that need to control the focus
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 }; 572 };
568 573
569 // Old WebFrameClient implementations ---------------------------------------- 574 // Old WebFrameClient implementations ----------------------------------------
570 575
571 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the 576 // RenderViewImpl used to be a WebFrameClient, but now RenderFrameImpl is the
572 // WebFrameClient. However, many implementations of WebFrameClient methods 577 // WebFrameClient. However, many implementations of WebFrameClient methods
573 // still live here and are called from RenderFrameImpl. These implementations 578 // still live here and are called from RenderFrameImpl. These implementations
574 // are to be moved to RenderFrameImpl <http://crbug.com/361761>. 579 // are to be moved to RenderFrameImpl <http://crbug.com/361761>.
575 580
576 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type); 581 void didChangeIcon(blink::WebLocalFrame*, blink::WebIconURL::Type);
577 void didUpdateCurrentHistoryItem(blink::WebLocalFrame* frame);
578 void didChangeScrollOffset(blink::WebLocalFrame* frame);
579 582
580 static Referrer GetReferrerFromRequest( 583 static Referrer GetReferrerFromRequest(
581 blink::WebFrame* frame, 584 blink::WebFrame* frame,
582 const blink::WebURLRequest& request); 585 const blink::WebURLRequest& request);
583 586
584 static WindowOpenDisposition NavigationPolicyToDisposition( 587 static WindowOpenDisposition NavigationPolicyToDisposition(
585 blink::WebNavigationPolicy policy); 588 blink::WebNavigationPolicy policy);
586 589
587 void ApplyWebPreferencesInternal(const WebPreferences& prefs, 590 void ApplyWebPreferencesInternal(const WebPreferences& prefs,
588 blink::WebView* web_view, 591 blink::WebView* web_view,
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 #endif 710 #endif
708 711
709 // Sends a reply to the current find operation handling if it was a 712 // Sends a reply to the current find operation handling if it was a
710 // synchronous find request. 713 // synchronous find request.
711 void SendFindReply(int request_id, 714 void SendFindReply(int request_id,
712 int match_count, 715 int match_count,
713 int ordinal, 716 int ordinal,
714 const blink::WebRect& selection_rect, 717 const blink::WebRect& selection_rect,
715 bool final_status_update); 718 bool final_status_update);
716 719
717 // Starts nav_state_sync_timer_ if it isn't already running.
718 void StartNavStateSyncTimerIfNecessary();
719
720 #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX)) 720 #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX))
721 void UpdateFontRenderingFromRendererPrefs(); 721 void UpdateFontRenderingFromRendererPrefs();
722 #else 722 #else
723 void UpdateFontRenderingFromRendererPrefs() {} 723 void UpdateFontRenderingFromRendererPrefs() {}
724 #endif 724 #endif
725 725
726 // In OOPIF-enabled modes, this tells each RenderFrame with a pending state
727 // update to inform the browser process.
728 void SendFrameStateUpdates();
729
726 // Update the target url and tell the browser that the target URL has changed. 730 // Update the target url and tell the browser that the target URL has changed.
727 // If |url| is empty, show |fallback_url|. 731 // If |url| is empty, show |fallback_url|.
728 void UpdateTargetURL(const GURL& url, const GURL& fallback_url); 732 void UpdateTargetURL(const GURL& url, const GURL& fallback_url);
729 733
730 // Tells the browser what the new list of favicons for the webpage is. 734 // Tells the browser what the new list of favicons for the webpage is.
731 void SendUpdateFaviconURL(const std::vector<FaviconURL>& urls); 735 void SendUpdateFaviconURL(const std::vector<FaviconURL>& urls);
732 736
733 // Invoked from DidStopLoading(). Sends the current list of loaded favicons to 737 // Invoked from DidStopLoading(). Sends the current list of loaded favicons to
734 // the browser. 738 // the browser.
735 void DidStopLoadingIcons(); 739 void DidStopLoadingIcons();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 822
819 // Whether we must stop creating nested message loops for modal dialogs until 823 // Whether we must stop creating nested message loops for modal dialogs until
820 // OnSwapOut is called. This is necessary because modal dialogs have a 824 // OnSwapOut is called. This is necessary because modal dialogs have a
821 // PageGroupLoadDeferrer on the stack that interferes with swapping out. 825 // PageGroupLoadDeferrer on the stack that interferes with swapping out.
822 bool suppress_dialogs_until_swap_out_; 826 bool suppress_dialogs_until_swap_out_;
823 827
824 // Timer used to delay the updating of nav state (see 828 // Timer used to delay the updating of nav state (see
825 // StartNavStateSyncTimerIfNecessary). 829 // StartNavStateSyncTimerIfNecessary).
826 base::OneShotTimer nav_state_sync_timer_; 830 base::OneShotTimer nav_state_sync_timer_;
827 831
832 // Set of RenderFrame routing IDs for frames that having pending UpdateState
833 // messages to send when the next |nav_state_sync_timer_| fires.
834 std::set<int> frames_with_pending_state_;
835
828 // Page IDs ------------------------------------------------------------------ 836 // Page IDs ------------------------------------------------------------------
829 // See documentation in RenderView. 837 // See documentation in RenderView.
830 int32 page_id_; 838 int32 page_id_;
831 839
832 // The next available page ID to use for this RenderView. These IDs are 840 // The next available page ID to use for this RenderView. These IDs are
833 // specific to a given RenderView and the frames within it. 841 // specific to a given RenderView and the frames within it.
834 int32 next_page_id_; 842 int32 next_page_id_;
835 843
836 // The offset of the current item in the history list. 844 // The offset of the current item in the history list.
837 int history_list_offset_; 845 int history_list_offset_;
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 // use the Observer interface to filter IPC messages and receive frame change 1031 // use the Observer interface to filter IPC messages and receive frame change
1024 // notifications. 1032 // notifications.
1025 // --------------------------------------------------------------------------- 1033 // ---------------------------------------------------------------------------
1026 1034
1027 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1035 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1028 }; 1036 };
1029 1037
1030 } // namespace content 1038 } // namespace content
1031 1039
1032 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1040 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698