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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 165703002: Do not send a frame swap ack from the browser until the frame is drawn (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dynamic_async
Patch Set: Created 6 years, 10 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
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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bool is_accelerated_compositing_active() { 238 bool is_accelerated_compositing_active() {
239 return is_accelerated_compositing_active_; 239 return is_accelerated_compositing_active_;
240 } 240 }
241 241
242 // Notifies the RenderWidgetHost that the View was destroyed. 242 // Notifies the RenderWidgetHost that the View was destroyed.
243 void ViewDestroyed(); 243 void ViewDestroyed();
244 244
245 // Indicates if the page has finished loading. 245 // Indicates if the page has finished loading.
246 void SetIsLoading(bool is_loading); 246 void SetIsLoading(bool is_loading);
247 247
248 // Set a callback to be called before waiting for a backing store. This is
249 // only used by Mac to release renderer backpressure during resize.
250 void SetAboutToWaitForBackingStoreCallback(
251 const base::Closure& about_to_wait_for_backing_store_callback);
piman 2014/02/14 02:15:57 Do you really need this? There's only a handful of
ccameron 2014/02/14 02:19:06 See the remark in the .cc -- the caller we need is
252
248 // Check for the existance of a BackingStore of the given |desired_size| and 253 // Check for the existance of a BackingStore of the given |desired_size| and
249 // return it if it exists. If the BackingStore is GPU, true is returned and 254 // return it if it exists. If the BackingStore is GPU, true is returned and
250 // |*backing_store| is set to NULL. 255 // |*backing_store| is set to NULL.
251 bool TryGetBackingStore(const gfx::Size& desired_size, 256 bool TryGetBackingStore(const gfx::Size& desired_size,
252 BackingStore** backing_store); 257 BackingStore** backing_store);
253 258
254 // Get access to the widget's backing store matching the size of the widget's 259 // Get access to the widget's backing store matching the size of the widget's
255 // view. If you pass |force_create| as true, then GetBackingStore may block 260 // view. If you pass |force_create| as true, then GetBackingStore may block
256 // for the renderer to send a new frame. Otherwise, NULL will be returned if 261 // for the renderer to send a new frame. Otherwise, NULL will be returned if
257 // the backing store doesn't already exist. It will also return NULL if the 262 // the backing store doesn't already exist. It will also return NULL if the
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 gfx::Vector2d last_scroll_offset_; 916 gfx::Vector2d last_scroll_offset_;
912 917
913 bool pending_mouse_lock_request_; 918 bool pending_mouse_lock_request_;
914 bool allow_privileged_mouse_lock_; 919 bool allow_privileged_mouse_lock_;
915 920
916 // Keeps track of whether the webpage has any touch event handler. If it does, 921 // Keeps track of whether the webpage has any touch event handler. If it does,
917 // then touch events are sent to the renderer. Otherwise, the touch events are 922 // then touch events are sent to the renderer. Otherwise, the touch events are
918 // not sent to the renderer. 923 // not sent to the renderer.
919 bool has_touch_handler_; 924 bool has_touch_handler_;
920 925
926 base::Closure about_to_wait_for_backing_store_callback_;
927
921 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 928 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
922 929
923 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; 930 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
924 931
925 // Receives and handles all input events. 932 // Receives and handles all input events.
926 scoped_ptr<InputRouter> input_router_; 933 scoped_ptr<InputRouter> input_router_;
927 934
928 scoped_ptr<OverscrollController> overscroll_controller_; 935 scoped_ptr<OverscrollController> overscroll_controller_;
929 936
930 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 937 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
931 938
932 #if defined(OS_WIN) 939 #if defined(OS_WIN)
933 std::list<HWND> dummy_windows_for_activation_; 940 std::list<HWND> dummy_windows_for_activation_;
934 #endif 941 #endif
935 942
936 // List of callbacks for pending snapshot requests to the renderer. 943 // List of callbacks for pending snapshot requests to the renderer.
937 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_; 944 std::queue<base::Callback<void(bool, const SkBitmap&)> > pending_snapshots_;
938 945
939 int64 last_input_number_; 946 int64 last_input_number_;
940 947
941 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 948 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
942 }; 949 };
943 950
944 } // namespace content 951 } // namespace content
945 952
946 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 953 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698