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

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

Issue 2792063003: Factor out RenderWidgetHostConnector (Closed)
Patch Set: class Created 3 years, 8 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_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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 public content::TextInputManager::Observer, 71 public content::TextInputManager::Observer,
72 public ui::DelegatedFrameHostAndroid::Client, 72 public ui::DelegatedFrameHostAndroid::Client,
73 public cc::BeginFrameObserver { 73 public cc::BeginFrameObserver {
74 public: 74 public:
75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget, 75 RenderWidgetHostViewAndroid(RenderWidgetHostImpl* widget,
76 ContentViewCoreImpl* content_view_core); 76 ContentViewCoreImpl* content_view_core);
77 ~RenderWidgetHostViewAndroid() override; 77 ~RenderWidgetHostViewAndroid() override;
78 78
79 void Blur(); 79 void Blur();
80 80
81 // Interface used to observe the destruction of a RenderWidgetHostViewAndroid.
82 class DestructionObserver {
83 public:
boliu 2017/04/13 04:29:41 protected virtual destructor
Jinsuk Kim 2017/04/13 04:44:05 Done.
84 virtual void RenderWidgetHostViewDestroyed(
85 RenderWidgetHostViewAndroid* rwhva) = 0;
86 };
87
88 void AddDestructionObserver(DestructionObserver* connector);
89 void RemoveDestructionObserver(DestructionObserver* connector);
90
81 // RenderWidgetHostView implementation. 91 // RenderWidgetHostView implementation.
82 bool OnMessageReceived(const IPC::Message& msg) override; 92 bool OnMessageReceived(const IPC::Message& msg) override;
83 void InitAsChild(gfx::NativeView parent_view) override; 93 void InitAsChild(gfx::NativeView parent_view) override;
84 void InitAsPopup(RenderWidgetHostView* parent_host_view, 94 void InitAsPopup(RenderWidgetHostView* parent_host_view,
85 const gfx::Rect& pos) override; 95 const gfx::Rect& pos) override;
86 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 96 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
87 RenderWidgetHost* GetRenderWidgetHost() const override; 97 RenderWidgetHost* GetRenderWidgetHost() const override;
88 void SetSize(const gfx::Size& size) override; 98 void SetSize(const gfx::Size& size) override;
89 void SetBounds(const gfx::Rect& rect) override; 99 void SetBounds(const gfx::Rect& rect) override;
90 gfx::Vector2dF GetLastScrollOffset() const override; 100 gfx::Vector2dF GetLastScrollOffset() const override;
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 407
398 // The last scroll offset of the view. 408 // The last scroll offset of the view.
399 gfx::Vector2dF last_scroll_offset_; 409 gfx::Vector2dF last_scroll_offset_;
400 410
401 float prev_top_shown_pix_; 411 float prev_top_shown_pix_;
402 float prev_bottom_shown_pix_; 412 float prev_bottom_shown_pix_;
403 413
404 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ = 414 cc::mojom::MojoCompositorFrameSinkClient* renderer_compositor_frame_sink_ =
405 nullptr; 415 nullptr;
406 416
417 std::list<DestructionObserver*> destruction_observers_;
418
407 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 419 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
408 420
409 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 421 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
410 }; 422 };
411 423
412 } // namespace content 424 } // namespace content
413 425
414 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 426 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698