| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(OS_MACOSX) | 9 #if defined(OS_MACOSX) |
| 10 #include <OpenGL/OpenGL.h> | 10 #include <OpenGL/OpenGL.h> |
| 11 #endif | 11 #endif |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
| 17 #include "third_party/skia/include/core/SkBitmap.h" | 17 #include "third_party/skia/include/core/SkBitmap.h" |
| 18 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputType.h" |
| 21 #include "ui/base/range/range.h" |
| 21 #include "ui/gfx/native_widget_types.h" | 22 #include "ui/gfx/native_widget_types.h" |
| 22 #include "ui/gfx/rect.h" | 23 #include "ui/gfx/rect.h" |
| 23 #include "ui/gfx/surface/transport_dib.h" | 24 #include "ui/gfx/surface/transport_dib.h" |
| 24 | 25 |
| 25 namespace gfx { | 26 namespace gfx { |
| 26 class Rect; | 27 class Rect; |
| 27 class Size; | 28 class Size; |
| 28 } | 29 } |
| 29 namespace IPC { | 30 namespace IPC { |
| 30 class Message; | 31 class Message; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 // Indicates whether the page has finished loading. | 133 // Indicates whether the page has finished loading. |
| 133 virtual void SetIsLoading(bool is_loading) = 0; | 134 virtual void SetIsLoading(bool is_loading) = 0; |
| 134 | 135 |
| 135 // Updates the state of the input method attached to the view. | 136 // Updates the state of the input method attached to the view. |
| 136 virtual void ImeUpdateTextInputState(WebKit::WebTextInputType type, | 137 virtual void ImeUpdateTextInputState(WebKit::WebTextInputType type, |
| 137 const gfx::Rect& caret_rect) = 0; | 138 const gfx::Rect& caret_rect) = 0; |
| 138 | 139 |
| 139 // Cancel the ongoing composition of the input method attached to the view. | 140 // Cancel the ongoing composition of the input method attached to the view. |
| 140 virtual void ImeCancelComposition() = 0; | 141 virtual void ImeCancelComposition() = 0; |
| 141 | 142 |
| 143 // Updates the range of the marked text in an IME composition. |
| 144 virtual void ImeCompositionRangeChanged(const ui::Range& range) {} |
| 145 |
| 142 // Informs the view that a portion of the widget's backing store was scrolled | 146 // Informs the view that a portion of the widget's backing store was scrolled |
| 143 // and/or painted. The view should ensure this gets copied to the screen. | 147 // and/or painted. The view should ensure this gets copied to the screen. |
| 144 // | 148 // |
| 145 // If the scroll_rect is non-empty, then a portion of the widget's backing | 149 // If the scroll_rect is non-empty, then a portion of the widget's backing |
| 146 // store was scrolled by dx pixels horizontally and dy pixels vertically. | 150 // store was scrolled by dx pixels horizontally and dy pixels vertically. |
| 147 // The exposed rect from the scroll operation is included in copy_rects. | 151 // The exposed rect from the scroll operation is included in copy_rects. |
| 148 // | 152 // |
| 149 // There are subtle performance implications here. The RenderWidget gets sent | 153 // There are subtle performance implications here. The RenderWidget gets sent |
| 150 // a paint ack after this returns, so if the view only ever invalidates in | 154 // a paint ack after this returns, so if the view only ever invalidates in |
| 151 // response to this, then on Windows, where WM_PAINT has lower priority than | 155 // response to this, then on Windows, where WM_PAINT has lower priority than |
| (...skipping 17 matching lines...) Expand all Loading... |
| 169 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0; | 173 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) = 0; |
| 170 | 174 |
| 171 // Tells the View to destroy itself. | 175 // Tells the View to destroy itself. |
| 172 virtual void Destroy() = 0; | 176 virtual void Destroy() = 0; |
| 173 | 177 |
| 174 // Tells the View that the tooltip text for the current mouse position over | 178 // Tells the View that the tooltip text for the current mouse position over |
| 175 // the page has changed. | 179 // the page has changed. |
| 176 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; | 180 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; |
| 177 | 181 |
| 178 // Notifies the View that the renderer text selection has changed. | 182 // Notifies the View that the renderer text selection has changed. |
| 179 virtual void SelectionChanged(const std::string& text) {} | 183 virtual void SelectionChanged(const std::string& text, |
| 184 const ui::Range& range) {} |
| 180 | 185 |
| 181 // Tells the View whether the context menu is showing. This is used on Linux | 186 // Tells the View whether the context menu is showing. This is used on Linux |
| 182 // to suppress updates to webkit focus for the duration of the show. | 187 // to suppress updates to webkit focus for the duration of the show. |
| 183 virtual void ShowingContextMenu(bool showing) {} | 188 virtual void ShowingContextMenu(bool showing) {} |
| 184 | 189 |
| 185 // Allocate a backing store for this view | 190 // Allocate a backing store for this view |
| 186 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; | 191 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 187 | 192 |
| 188 #if defined(OS_MACOSX) | 193 #if defined(OS_MACOSX) |
| 189 // Tells the view whether or not to accept first responder status. If |flag| | 194 // Tells the view whether or not to accept first responder status. If |flag| |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 326 |
| 322 // The current reserved area in view coordinates where contents should not be | 327 // The current reserved area in view coordinates where contents should not be |
| 323 // rendered to draw the resize corner, sidebar mini tabs etc. | 328 // rendered to draw the resize corner, sidebar mini tabs etc. |
| 324 gfx::Rect reserved_rect_; | 329 gfx::Rect reserved_rect_; |
| 325 | 330 |
| 326 private: | 331 private: |
| 327 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 332 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
| 328 }; | 333 }; |
| 329 | 334 |
| 330 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 335 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
| OLD | NEW |