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

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

Issue 2490383002: Revert of Resolves layering violation in SynchronousCompositorHost creation (Closed)
Patch Set: Created 4 years, 1 month 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_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 namespace ui { 55 namespace ui {
56 class DelegatedFrameHostAndroid; 56 class DelegatedFrameHostAndroid;
57 } 57 }
58 58
59 namespace content { 59 namespace content {
60 class ContentViewCoreImpl; 60 class ContentViewCoreImpl;
61 class OverscrollControllerAndroid; 61 class OverscrollControllerAndroid;
62 class RenderWidgetHost; 62 class RenderWidgetHost;
63 class RenderWidgetHostImpl; 63 class RenderWidgetHostImpl;
64 class SynchronousCompositorHost; 64 class SynchronousCompositorHost;
65 class SynchronousCompositorClient;
66 struct NativeWebKeyboardEvent; 65 struct NativeWebKeyboardEvent;
67 struct TextInputState; 66 struct TextInputState;
68 67
69 // ----------------------------------------------------------------------------- 68 // -----------------------------------------------------------------------------
70 // See comments in render_widget_host_view.h about this class and its members. 69 // See comments in render_widget_host_view.h about this class and its members.
71 // ----------------------------------------------------------------------------- 70 // -----------------------------------------------------------------------------
72 class CONTENT_EXPORT RenderWidgetHostViewAndroid 71 class CONTENT_EXPORT RenderWidgetHostViewAndroid
73 : public RenderWidgetHostViewBase, 72 : public RenderWidgetHostViewBase,
74 public ui::GestureProviderClient, 73 public ui::GestureProviderClient,
75 public ui::WindowAndroidObserver, 74 public ui::WindowAndroidObserver,
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 230
232 bool HasValidFrame() const; 231 bool HasValidFrame() const;
233 232
234 void MoveCaret(const gfx::Point& point); 233 void MoveCaret(const gfx::Point& point);
235 void DismissTextHandles(); 234 void DismissTextHandles();
236 void SetTextHandlesTemporarilyHidden(bool hidden); 235 void SetTextHandlesTemporarilyHidden(bool hidden);
237 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); 236 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip);
238 237
239 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata); 238 void SynchronousFrameMetadata(cc::CompositorFrameMetadata frame_metadata);
240 239
241 void SetSynchronousCompositorClient(SynchronousCompositorClient* client);
242
243 SynchronousCompositorClient* synchronous_compositor_client() const {
244 return synchronous_compositor_client_;
245 }
246
247 static void OnContextLost(); 240 static void OnContextLost();
248 241
249 private: 242 private:
250 void RunAckCallbacks(); 243 void RunAckCallbacks();
251 244
252 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id); 245 void CheckCompositorFrameSinkChanged(uint32_t compositor_frame_sink_id);
253 void SubmitCompositorFrame(cc::CompositorFrame frame_data); 246 void SubmitCompositorFrame(cc::CompositorFrame frame_data);
254 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id, 247 void SendReclaimCompositorResources(uint32_t compositor_frame_sink_id,
255 bool is_swap_ack); 248 bool is_swap_ack);
256 249
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Manages selection handle rendering and manipulation. 344 // Manages selection handle rendering and manipulation.
352 // This will always be NULL if |content_view_core_| is NULL. 345 // This will always be NULL if |content_view_core_| is NULL.
353 std::unique_ptr<ui::TouchSelectionController> selection_controller_; 346 std::unique_ptr<ui::TouchSelectionController> selection_controller_;
354 347
355 // Bounds to use if we have no backing ContentViewCore 348 // Bounds to use if we have no backing ContentViewCore
356 gfx::Rect default_bounds_; 349 gfx::Rect default_bounds_;
357 350
358 const bool using_browser_compositor_; 351 const bool using_browser_compositor_;
359 std::unique_ptr<SynchronousCompositorHost> sync_compositor_; 352 std::unique_ptr<SynchronousCompositorHost> sync_compositor_;
360 353
361 SynchronousCompositorClient* synchronous_compositor_client_;
362
363 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_; 354 std::unique_ptr<DelegatedFrameEvictor> frame_evictor_;
364 355
365 size_t locks_on_frame_count_; 356 size_t locks_on_frame_count_;
366 bool observing_root_window_; 357 bool observing_root_window_;
367 358
368 struct LastFrameInfo { 359 struct LastFrameInfo {
369 LastFrameInfo(uint32_t compositor_frame_sink_id, 360 LastFrameInfo(uint32_t compositor_frame_sink_id,
370 cc::CompositorFrame output_frame); 361 cc::CompositorFrame output_frame);
371 ~LastFrameInfo(); 362 ~LastFrameInfo();
372 uint32_t compositor_frame_sink_id; 363 uint32_t compositor_frame_sink_id;
373 cc::CompositorFrame frame; 364 cc::CompositorFrame frame;
374 }; 365 };
375 366
376 std::unique_ptr<LastFrameInfo> last_frame_info_; 367 std::unique_ptr<LastFrameInfo> last_frame_info_;
377 368
378 // The last scroll offset of the view. 369 // The last scroll offset of the view.
379 gfx::Vector2dF last_scroll_offset_; 370 gfx::Vector2dF last_scroll_offset_;
380 371
381 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 372 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
382 373
383 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 374 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
384 }; 375 };
385 376
386 } // namespace content 377 } // namespace content
387 378
388 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 379 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698