| OLD | NEW |
| 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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(TOOLKIT_USES_GTK) | 9 #if defined(TOOLKIT_USES_GTK) |
| 10 #include <gdk/gdk.h> | 10 #include <gdk/gdk.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
| 14 #include "third_party/skia/include/core/SkBitmap.h" | 14 #include "third_party/skia/include/core/SkBitmap.h" |
| 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 16 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 17 | 17 |
| 18 class BrowserAccessibilityManager; | 18 class BrowserAccessibilityManager; |
| 19 class RenderWidgetHost; | 19 class RenderWidgetHost; |
| 20 | 20 |
| 21 namespace gfx { | 21 namespace gfx { |
| 22 class Rect; | 22 class Rect; |
| 23 class Size; | 23 class Size; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { |
| 27 |
| 26 // RenderWidgetHostView is an interface implemented by an object that acts as | 28 // RenderWidgetHostView is an interface implemented by an object that acts as |
| 27 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 29 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
| 28 // associated RenderProcessHost own the "Model" in this case which is the | 30 // associated RenderProcessHost own the "Model" in this case which is the |
| 29 // child renderer process. The View is responsible for receiving events from | 31 // child renderer process. The View is responsible for receiving events from |
| 30 // the surrounding environment and passing them to the RenderWidgetHost, and | 32 // the surrounding environment and passing them to the RenderWidgetHost, and |
| 31 // for actually displaying the content of the RenderWidgetHost when it | 33 // for actually displaying the content of the RenderWidgetHost when it |
| 32 // changes. | 34 // changes. |
| 33 // | |
| 34 // TODO(joi): Move to content namespace. | |
| 35 class CONTENT_EXPORT RenderWidgetHostView { | 35 class CONTENT_EXPORT RenderWidgetHostView { |
| 36 public: | 36 public: |
| 37 virtual ~RenderWidgetHostView() {} | 37 virtual ~RenderWidgetHostView() {} |
| 38 | 38 |
| 39 // Platform-specific creator. Use this to construct new RenderWidgetHostViews | 39 // Platform-specific creator. Use this to construct new RenderWidgetHostViews |
| 40 // rather than using RenderWidgetHostViewWin & friends. | 40 // rather than using RenderWidgetHostViewWin & friends. |
| 41 // | 41 // |
| 42 // This function must NOT size it, because the RenderView in the renderer | 42 // This function must NOT size it, because the RenderView in the renderer |
| 43 // wouldn't have been created yet. The widget would set its "waiting for | 43 // wouldn't have been created yet. The widget would set its "waiting for |
| 44 // resize ack" flag, and the ack would never come becasue no RenderView | 44 // resize ack" flag, and the ack would never come becasue no RenderView |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 // the custom background for their platform. | 131 // the custom background for their platform. |
| 132 virtual void SetBackground(const SkBitmap& background) = 0; | 132 virtual void SetBackground(const SkBitmap& background) = 0; |
| 133 virtual const SkBitmap& GetBackground() = 0; | 133 virtual const SkBitmap& GetBackground() = 0; |
| 134 | 134 |
| 135 // TODO(joi): Remove this when we remove the dependency by chrome/ | 135 // TODO(joi): Remove this when we remove the dependency by chrome/ |
| 136 // on browser_accessibility* files in content. | 136 // on browser_accessibility* files in content. |
| 137 virtual BrowserAccessibilityManager* | 137 virtual BrowserAccessibilityManager* |
| 138 GetBrowserAccessibilityManager() const = 0; | 138 GetBrowserAccessibilityManager() const = 0; |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 } // namespace content |
| 142 |
| 141 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 143 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| 142 | 144 |
| 143 | 145 |
| OLD | NEW |