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/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 // the custom background for their platform. | 107 // the custom background for their platform. |
108 virtual void SetBackground(const SkBitmap& background) = 0; | 108 virtual void SetBackground(const SkBitmap& background) = 0; |
109 virtual const SkBitmap& GetBackground() = 0; | 109 virtual const SkBitmap& GetBackground() = 0; |
110 | 110 |
111 // Return value indicates whether the mouse is locked successfully or not. | 111 // Return value indicates whether the mouse is locked successfully or not. |
112 virtual bool LockMouse() = 0; | 112 virtual bool LockMouse() = 0; |
113 virtual void UnlockMouse() = 0; | 113 virtual void UnlockMouse() = 0; |
114 // Returns true if the mouse pointer is currently locked. | 114 // Returns true if the mouse pointer is currently locked. |
115 virtual bool IsMouseLocked() = 0; | 115 virtual bool IsMouseLocked() = 0; |
116 | 116 |
117 // Retrives the size of the viewport for the visible region. May be smaller | |
118 // than the view size if a portion of the view is obstructed (e.g. by a | |
119 // virtual keyboard). | |
120 virtual gfx::SizeF GetVisibleViewportSize() const = 0; | |
sky
2014/04/24 15:55:09
Why is this floating point when nothing else in th
kevers
2014/04/24 18:38:33
Based on suggestion by aelias. Android makes sign
| |
121 | |
122 // Set insets for the visible region of the root window. Used to compute the | |
123 // visible viewport. | |
124 virtual void SetInsets(const gfx::Insets& insets) = 0; | |
125 | |
117 #if defined(OS_MACOSX) | 126 #if defined(OS_MACOSX) |
118 // Set the view's active state (i.e., tint state of controls). | 127 // Set the view's active state (i.e., tint state of controls). |
119 virtual void SetActive(bool active) = 0; | 128 virtual void SetActive(bool active) = 0; |
120 | 129 |
121 // Tells the view whether or not to accept first responder status. If |flag| | 130 // Tells the view whether or not to accept first responder status. If |flag| |
122 // is true, the view does not accept first responder status and instead | 131 // is true, the view does not accept first responder status and instead |
123 // manually becomes first responder when it receives a mouse down event. If | 132 // manually becomes first responder when it receives a mouse down event. If |
124 // |flag| is false, the view participates in the key-view chain as normal. | 133 // |flag| is false, the view participates in the key-view chain as normal. |
125 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; | 134 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) = 0; |
126 | 135 |
(...skipping 18 matching lines...) Expand all Loading... | |
145 // Returns |true| if text is currently being spoken by Mac OS X. | 154 // Returns |true| if text is currently being spoken by Mac OS X. |
146 virtual bool IsSpeaking() const = 0; | 155 virtual bool IsSpeaking() const = 0; |
147 // Stops speaking, if it is currently in progress. | 156 // Stops speaking, if it is currently in progress. |
148 virtual void StopSpeaking() = 0; | 157 virtual void StopSpeaking() = 0; |
149 #endif // defined(OS_MACOSX) | 158 #endif // defined(OS_MACOSX) |
150 }; | 159 }; |
151 | 160 |
152 } // namespace content | 161 } // namespace content |
153 | 162 |
154 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 163 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
OLD | NEW |