| 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" |
| 11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "third_party/skia/include/core/SkColor.h" |
| 13 #include "third_party/skia/include/core/SkRegion.h" | 14 #include "third_party/skia/include/core/SkRegion.h" |
| 14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 15 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 16 #include "ui/gfx/native_widget_types.h" |
| 16 | 17 |
| 17 class GURL; | 18 class GURL; |
| 18 | 19 |
| 19 namespace gfx { | 20 namespace gfx { |
| 20 class Rect; | 21 class Rect; |
| 21 class Size; | 22 class Size; |
| 22 } | 23 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 98 |
| 98 // Returns true if the View's context menu is showing. | 99 // Returns true if the View's context menu is showing. |
| 99 virtual bool IsShowingContextMenu() const = 0; | 100 virtual bool IsShowingContextMenu() const = 0; |
| 100 | 101 |
| 101 // Tells the View whether the context menu is showing. | 102 // Tells the View whether the context menu is showing. |
| 102 virtual void SetShowingContextMenu(bool showing) = 0; | 103 virtual void SetShowingContextMenu(bool showing) = 0; |
| 103 | 104 |
| 104 // Returns the currently selected text. | 105 // Returns the currently selected text. |
| 105 virtual base::string16 GetSelectedText() const = 0; | 106 virtual base::string16 GetSelectedText() const = 0; |
| 106 | 107 |
| 107 // Subclasses should override this method to do what is appropriate to set | 108 // Subclasses should override this method to set the background color. |color| |
| 108 // the background to be transparent or opaque. | 109 // could be transparent or opaque. |
| 109 virtual void SetBackgroundOpaque(bool opaque) = 0; | 110 virtual void SetBackgroundColor(SkColor color) = 0; |
| 111 // Convenience method to fill the background layer with the default color by |
| 112 // calling |SetBackgroundColor|. |
| 113 virtual void SetBackgroundColorToDefault() = 0; |
| 110 virtual bool GetBackgroundOpaque() = 0; | 114 virtual bool GetBackgroundOpaque() = 0; |
| 111 | 115 |
| 112 // Return value indicates whether the mouse is locked successfully or not. | 116 // Return value indicates whether the mouse is locked successfully or not. |
| 113 virtual bool LockMouse() = 0; | 117 virtual bool LockMouse() = 0; |
| 114 virtual void UnlockMouse() = 0; | 118 virtual void UnlockMouse() = 0; |
| 115 // Returns true if the mouse pointer is currently locked. | 119 // Returns true if the mouse pointer is currently locked. |
| 116 virtual bool IsMouseLocked() = 0; | 120 virtual bool IsMouseLocked() = 0; |
| 117 | 121 |
| 118 // Retrives the size of the viewport for the visible region. May be smaller | 122 // Retrives the size of the viewport for the visible region. May be smaller |
| 119 // than the view size if a portion of the view is obstructed (e.g. by a | 123 // than the view size if a portion of the view is obstructed (e.g. by a |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // Returns |true| if text is currently being spoken by Mac OS X. | 169 // Returns |true| if text is currently being spoken by Mac OS X. |
| 166 virtual bool IsSpeaking() const = 0; | 170 virtual bool IsSpeaking() const = 0; |
| 167 // Stops speaking, if it is currently in progress. | 171 // Stops speaking, if it is currently in progress. |
| 168 virtual void StopSpeaking() = 0; | 172 virtual void StopSpeaking() = 0; |
| 169 #endif // defined(OS_MACOSX) | 173 #endif // defined(OS_MACOSX) |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 } // namespace content | 176 } // namespace content |
| 173 | 177 |
| 174 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ | 178 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |