Chromium Code Reviews| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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. | 115 // Notifies the View that the renderer text selection has changed. |
| 116 virtual void SelectionChanged() { }; | 116 virtual void SelectionChanged(const std::string& text) { }; |
|
darin (slow to review)
2009/04/09 05:00:28
nit: no need for trailing ';'
| |
| 117 | |
| 118 // Notifies the View what the current selection text is. | |
| 119 virtual void SetSelectionText(const std::string& text) { }; | |
| 120 | 117 |
| 121 // Tells the View to get the text from the selection clipboard and send it | 118 // Tells the View to get the text from the selection clipboard and send it |
| 122 // back to the renderer asynchronously. | 119 // back to the renderer asynchronously. |
| 123 virtual void PasteFromSelectionClipboard() { } | 120 virtual void PasteFromSelectionClipboard() { } |
| 124 | 121 |
| 125 // Allocate a backing store for this view | 122 // Allocate a backing store for this view |
| 126 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 123 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 127 | 124 |
| 128 void set_activatable(bool activatable) { | 125 void set_activatable(bool activatable) { |
| 129 activatable_ = activatable; | 126 activatable_ = activatable; |
| 130 } | 127 } |
| 131 bool activatable() const { return activatable_; } | 128 bool activatable() const { return activatable_; } |
| 132 | 129 |
| 133 protected: | 130 protected: |
| 134 // Interface class only, do not construct. | 131 // Interface class only, do not construct. |
| 135 RenderWidgetHostView() : activatable_(true) {} | 132 RenderWidgetHostView() : activatable_(true) {} |
| 136 | 133 |
| 137 // Whether the window can be activated. Autocomplete popup windows for example | 134 // Whether the window can be activated. Autocomplete popup windows for example |
| 138 // cannot be activated. Default is true. | 135 // cannot be activated. Default is true. |
| 139 bool activatable_; | 136 bool activatable_; |
| 140 | 137 |
| 141 private: | 138 private: |
| 142 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 139 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
| 143 }; | 140 }; |
| 144 | 141 |
| 145 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 142 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |