// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ #include "base/gfx/native_widget_types.h" #include "base/shared_memory.h" #include "skia/include/SkBitmap.h" #include "webkit/glue/webplugin.h" #include "webkit/glue/webwidget_delegate.h" namespace gfx { class Rect; class Size; } namespace IPC { class Message; } class BackingStore; class RenderProcessHost; class RenderWidgetHost; class WebCursor; // RenderWidgetHostView is an interface implemented by an object that acts as // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its // associated RenderProcessHost own the "Model" in this case which is the // child renderer process. The View is responsible for receiving events from // the surrounding environment and passing them to the RenderWidgetHost, and // for actually displaying the content of the RenderWidgetHost when it // changes. class RenderWidgetHostView { public: virtual ~RenderWidgetHostView(){}; // Platform-specific creator. Use this to construct new RenderWidgetHostViews // rather than using RenderWidgetHostViewWin & friends. // // This function must NOT size it, because the RenderView in the renderer // wounldn't have been created yet. The widget would set its "waiting for // resize ack" flag, and the ack would never come becasue no RenderView // received it. // // The RenderWidgetHost must already be created (because we can't know if it's // going to be a regular RenderWidgetHost or a RenderViewHost (a subclass). static RenderWidgetHostView* CreateViewForWidget(RenderWidgetHost* widget); // Perform all the initialization steps necessary for this object to represent // a popup (such as a