| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "webkit/glue/webplugin.h" | 10 #include "webkit/glue/webplugin.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // Notifies the View that the renderer has ceased to exist. | 105 // Notifies the View that the renderer has ceased to exist. |
| 106 virtual void RenderViewGone() = 0; | 106 virtual void RenderViewGone() = 0; |
| 107 | 107 |
| 108 // Tells the View to destroy itself. | 108 // Tells the View to destroy itself. |
| 109 virtual void Destroy() = 0; | 109 virtual void Destroy() = 0; |
| 110 | 110 |
| 111 // Tells the View that the tooltip text for the current mouse position over | 111 // Tells the View that the tooltip text for the current mouse position over |
| 112 // the page has changed. | 112 // the page has changed. |
| 113 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; | 113 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; |
| 114 | 114 |
| 115 // Notifies the View that the renderer text selection has changed. |
| 116 virtual void SelectionChanged() { }; |
| 117 |
| 118 // Notifies the View what the current selection text is. |
| 119 virtual void SetSelectionText(const std::string& text) { }; |
| 120 |
| 115 // Tells the View to get the text from the selection clipboard and send it | 121 // Tells the View to get the text from the selection clipboard and send it |
| 116 // back to the renderer asynchronously. | 122 // back to the renderer asynchronously. |
| 117 virtual void PasteFromSelectionClipboard() { } | 123 virtual void PasteFromSelectionClipboard() { } |
| 118 | 124 |
| 119 // Allocate a backing store for this view | 125 // Allocate a backing store for this view |
| 120 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 126 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 121 | 127 |
| 122 void set_activatable(bool activatable) { | 128 void set_activatable(bool activatable) { |
| 123 activatable_ = activatable; | 129 activatable_ = activatable; |
| 124 } | 130 } |
| 125 bool activatable() const { return activatable_; } | 131 bool activatable() const { return activatable_; } |
| 126 | 132 |
| 127 protected: | 133 protected: |
| 128 // Interface class only, do not construct. | 134 // Interface class only, do not construct. |
| 129 RenderWidgetHostView() : activatable_(true) {} | 135 RenderWidgetHostView() : activatable_(true) {} |
| 130 | 136 |
| 131 // Whether the window can be activated. Autocomplete popup windows for example | 137 // Whether the window can be activated. Autocomplete popup windows for example |
| 132 // cannot be activated. Default is true. | 138 // cannot be activated. Default is true. |
| 133 bool activatable_; | 139 bool activatable_; |
| 134 | 140 |
| 135 private: | 141 private: |
| 136 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 142 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
| 137 }; | 143 }; |
| 138 | 144 |
| 139 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 145 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |