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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.h

Issue 100473010: Adding RenderWidgetHostViewChildFrame for OOPIF view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: constructor rated explicit Created 6 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_widget_host_view_guest.h
diff --git a/content/browser/renderer_host/render_widget_host_view_guest.h b/content/browser/frame_host/render_widget_host_view_guest.h
similarity index 79%
rename from content/browser/renderer_host/render_widget_host_view_guest.h
rename to content/browser/frame_host/render_widget_host_view_guest.h
index 933c83b5525b822a2e63fb5ad939fb0338cf943e..899922d2527c748df27dc80715346a15a2fd0431 100644
--- a/content/browser/renderer_host/render_widget_host_view_guest.h
+++ b/content/browser/frame_host/render_widget_host_view_guest.h
@@ -2,13 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
-#define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
+#ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
+#define CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
#include <vector>
#include "base/memory/scoped_ptr.h"
-#include "content/browser/renderer_host/render_widget_host_view_base.h"
+#include "content/browser/frame_host/render_widget_host_view_child_frame.h"
#include "content/common/content_export.h"
#include "ui/events/event.h"
#include "ui/events/gestures/gesture_recognizer.h"
@@ -28,16 +28,18 @@ class RenderWidgetHostImpl;
class BrowserPluginGuest;
struct NativeWebKeyboardEvent;
-// -----------------------------------------------------------------------------
// See comments in render_widget_host_view.h about this class and its members.
-// This version is for the webview plugin which handles a lot of the
+// This version is for the BrowserPlugin which handles a lot of the
// functionality in a diffent place and isn't platform specific.
+// The BrowserPlugin is currently a special case for out-of-process rendered
+// content and therefore inherits from RenderWidgetHostViewChildFrame.
+// Eventually all RenderWidgetHostViewGuest code will be subsumed by
+// RenderWidgetHostViewChildFrame and this class will be removed.
//
// Some elements that are platform specific will be deal with by delegating
// the relevant calls to the platform view.
-// -----------------------------------------------------------------------------
class CONTENT_EXPORT RenderWidgetHostViewGuest
- : public RenderWidgetHostViewBase,
+ : public RenderWidgetHostViewChildFrame,
public ui::GestureConsumer,
public ui::GestureEventHelper {
public:
@@ -49,22 +51,14 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
// RenderWidgetHostView implementation.
virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
virtual void InitAsChild(gfx::NativeView parent_view) OVERRIDE;
- virtual RenderWidgetHost* GetRenderWidgetHost() const OVERRIDE;
virtual void SetSize(const gfx::Size& size) OVERRIDE;
virtual void SetBounds(const gfx::Rect& rect) OVERRIDE;
virtual gfx::NativeView GetNativeView() const OVERRIDE;
virtual gfx::NativeViewId GetNativeViewId() const OVERRIDE;
virtual gfx::NativeViewAccessible GetNativeViewAccessible() OVERRIDE;
- virtual bool HasFocus() const OVERRIDE;
- virtual bool IsSurfaceAvailableForCopy() const OVERRIDE;
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual bool IsShowing() OVERRIDE;
virtual gfx::Rect GetViewBounds() const OVERRIDE;
virtual void SetBackground(const SkBitmap& background) OVERRIDE;
-#if defined(OS_WIN) && !defined(USE_AURA)
- virtual void SetClickthroughRegion(SkRegion* region) OVERRIDE;
-#endif
+ virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE;
// RenderWidgetHostViewPort implementation.
virtual void InitAsPopup(RenderWidgetHostView* parent_host_view,
@@ -76,8 +70,6 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
virtual void MovePluginWindows(
const gfx::Vector2d& scroll_offset,
const std::vector<WebPluginGeometry>& moves) OVERRIDE;
- virtual void Focus() OVERRIDE;
- virtual void Blur() OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
virtual void TextInputTypeChanged(ui::TextInputType type,
@@ -97,27 +89,16 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
virtual void RenderProcessGone(base::TerminationStatus status,
int error_code) OVERRIDE;
virtual void Destroy() OVERRIDE;
- virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {}
virtual void SetTooltipText(const base::string16& tooltip_text) OVERRIDE;
virtual void SelectionChanged(const base::string16& text,
size_t offset,
const gfx::Range& range) OVERRIDE;
virtual void SelectionBoundsChanged(
const ViewHostMsg_SelectionBounds_Params& params) OVERRIDE;
- virtual void ScrollOffsetChanged() OVERRIDE;
- virtual BackingStore* AllocBackingStore(const gfx::Size& size) OVERRIDE;
virtual void CopyFromCompositingSurface(
const gfx::Rect& src_subrect,
const gfx::Size& dst_size,
const base::Callback<void(bool, const SkBitmap&)>& callback) OVERRIDE;
- virtual void CopyFromCompositingSurfaceToVideoFrame(
- const gfx::Rect& src_subrect,
- const scoped_refptr<media::VideoFrame>& target,
- const base::Callback<void(bool)>& callback) OVERRIDE;
- virtual bool CanCopyToVideoFrame() const OVERRIDE;
- virtual void OnAcceleratedCompositingStateChange() OVERRIDE;
- virtual void AcceleratedSurfaceInitialized(int host_id,
- int route_id) OVERRIDE;
virtual void AcceleratedSurfaceBuffersSwapped(
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params,
int gpu_host_id) OVERRIDE;
@@ -127,15 +108,10 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
virtual void OnSwapCompositorFrame(
uint32 output_surface_id,
scoped_ptr<cc::CompositorFrame> frame) OVERRIDE;
- virtual void AcceleratedSurfaceSuspend() OVERRIDE;
- virtual void AcceleratedSurfaceRelease() OVERRIDE;
- virtual bool HasAcceleratedSurface(const gfx::Size& desired_size) OVERRIDE;
virtual void SetHasHorizontalScrollbar(
bool has_horizontal_scrollbar) OVERRIDE;
virtual void SetScrollOffsetPinning(
bool is_pinned_to_left, bool is_pinned_to_right) OVERRIDE;
- virtual gfx::Rect GetBoundsInRootWindow() OVERRIDE;
- virtual gfx::GLSurfaceHandle GetCompositingSurface() OVERRIDE;
#if defined(OS_WIN) || defined(USE_AURA)
virtual void ProcessAckedTouchEvent(
const TouchEventWithLatencyInfo& touch,
@@ -202,9 +178,6 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
// Process all of the given gestures (passes them on to renderer)
void ProcessGestures(ui::GestureRecognizer::Gestures* gestures);
- // The model object.
- RenderWidgetHostImpl* host_;
-
BrowserPluginGuest *guest_;
gfx::Size size_;
// The platform view for this RenderWidgetHostView.
@@ -219,4 +192,4 @@ class CONTENT_EXPORT RenderWidgetHostViewGuest
} // namespace content
-#endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_
+#endif // CONTENT_BROWSER_FRAME_HOST_RENDER_WIDGET_HOST_VIEW_GUEST_H_

Powered by Google App Engine
This is Rietveld 408576698