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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 } | 23 } |
24 | 24 |
25 namespace ui { | 25 namespace ui { |
26 class TextInputClient; | 26 class TextInputClient; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 | 30 |
31 class RenderWidgetHost; | 31 class RenderWidgetHost; |
32 class RenderWidgetHostViewFrameSubscriber; | 32 class RenderWidgetHostViewFrameSubscriber; |
| 33 class RenderWidgetHostViewMus; |
33 | 34 |
34 // RenderWidgetHostView is an interface implemented by an object that acts as | 35 // RenderWidgetHostView is an interface implemented by an object that acts as |
35 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 36 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
36 // associated RenderProcessHost own the "Model" in this case which is the | 37 // associated RenderProcessHost own the "Model" in this case which is the |
37 // child renderer process. The View is responsible for receiving events from | 38 // child renderer process. The View is responsible for receiving events from |
38 // the surrounding environment and passing them to the RenderWidgetHost, and | 39 // the surrounding environment and passing them to the RenderWidgetHost, and |
39 // for actually displaying the content of the RenderWidgetHost when it | 40 // for actually displaying the content of the RenderWidgetHost when it |
40 // changes. | 41 // changes. |
41 // | 42 // |
42 // RenderWidgetHostView Class Hierarchy: | 43 // RenderWidgetHostView Class Hierarchy: |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 virtual bool IsSurfaceAvailableForCopy() const = 0; | 87 virtual bool IsSurfaceAvailableForCopy() const = 0; |
87 | 88 |
88 // Shows/hides the view. These must always be called together in pairs. | 89 // Shows/hides the view. These must always be called together in pairs. |
89 // It is not legal to call Hide() multiple times in a row. | 90 // It is not legal to call Hide() multiple times in a row. |
90 virtual void Show() = 0; | 91 virtual void Show() = 0; |
91 virtual void Hide() = 0; | 92 virtual void Hide() = 0; |
92 | 93 |
93 // Whether the view is showing. | 94 // Whether the view is showing. |
94 virtual bool IsShowing() = 0; | 95 virtual bool IsShowing() = 0; |
95 | 96 |
| 97 // Whether this view is managed by mus. |
| 98 virtual RenderWidgetHostViewMus* AsMusView() = 0; |
| 99 |
96 // Indicates if the view is currently occluded (e.g, not visible because it's | 100 // Indicates if the view is currently occluded (e.g, not visible because it's |
97 // covered up by other windows), and as a result the view's renderer may be | 101 // covered up by other windows), and as a result the view's renderer may be |
98 // suspended. If Show() is called on a view then its state should be re-set to | 102 // suspended. If Show() is called on a view then its state should be re-set to |
99 // being un-occluded (an explicit WasUnOccluded call will not be made for | 103 // being un-occluded (an explicit WasUnOccluded call will not be made for |
100 // that). These calls are not necessarily made in pairs. | 104 // that). These calls are not necessarily made in pairs. |
101 virtual void WasUnOccluded() = 0; | 105 virtual void WasUnOccluded() = 0; |
102 virtual void WasOccluded() = 0; | 106 virtual void WasOccluded() = 0; |
103 | 107 |
104 // Retrieve the bounds of the View, in screen coordinates. | 108 // Retrieve the bounds of the View, in screen coordinates. |
105 virtual gfx::Rect GetViewBounds() const = 0; | 109 virtual gfx::Rect GetViewBounds() const = 0; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 // Returns |true| if text is currently being spoken by Mac OS X. | 175 // Returns |true| if text is currently being spoken by Mac OS X. |
172 virtual bool IsSpeaking() const = 0; | 176 virtual bool IsSpeaking() const = 0; |
173 // Stops speaking, if it is currently in progress. | 177 // Stops speaking, if it is currently in progress. |
174 virtual void StopSpeaking() = 0; | 178 virtual void StopSpeaking() = 0; |
175 #endif // defined(OS_MACOSX) | 179 #endif // defined(OS_MACOSX) |
176 }; | 180 }; |
177 | 181 |
178 } // namespace content | 182 } // namespace content |
179 | 183 |
180 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 184 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |