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_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Informs that the focused DOM node has changed. | 108 // Informs that the focused DOM node has changed. |
109 virtual void FocusedNodeChanged(bool is_editable_node) = 0; | 109 virtual void FocusedNodeChanged(bool is_editable_node) = 0; |
110 | 110 |
111 #if defined(OS_MACOSX) || defined(USE_AURA) | 111 #if defined(OS_MACOSX) || defined(USE_AURA) |
112 // Updates the range of the marked text in an IME composition. | 112 // Updates the range of the marked text in an IME composition. |
113 virtual void ImeCompositionRangeChanged( | 113 virtual void ImeCompositionRangeChanged( |
114 const gfx::Range& range, | 114 const gfx::Range& range, |
115 const std::vector<gfx::Rect>& character_bounds) = 0; | 115 const std::vector<gfx::Rect>& character_bounds) = 0; |
116 #endif | 116 #endif |
117 | 117 |
118 // Informs the view that a portion of the widget's backing store was scrolled | |
119 // and/or painted. The view should ensure this gets copied to the screen. | |
120 // | |
121 // If the scroll_rect is non-empty, then a portion of the widget's backing | |
122 // store was scrolled by dx pixels horizontally and dy pixels vertically. | |
123 // The exposed rect from the scroll operation is included in copy_rects. | |
124 // | |
125 // There are subtle performance implications here. The RenderWidget gets sent | |
126 // a paint ack after this returns, so if the view only ever invalidates in | |
127 // response to this, then on Windows, where WM_PAINT has lower priority than | |
128 // events which can cause renderer resizes/paint rect updates, e.g. | |
129 // drag-resizing can starve painting; this function thus provides the view its | |
130 // main chance to ensure it stays painted and not just invalidated. On the | |
131 // other hand, if this always blindly paints, then if we're already in the | |
132 // midst of a paint on the callstack, we can double-paint unnecessarily. | |
133 // (Worse, we might recursively call RenderWidgetHost::GetBackingStore().) | |
134 // Thus implementers should generally paint as much of |rect| as possible | |
135 // synchronously with as little overpainting as possible. | |
136 virtual void DidUpdateBackingStore( | |
137 const gfx::Rect& scroll_rect, | |
138 const gfx::Vector2d& scroll_delta, | |
139 const std::vector<gfx::Rect>& copy_rects, | |
140 const std::vector<ui::LatencyInfo>& latency_info) = 0; | |
141 | |
142 // Notifies the View that the renderer has ceased to exist. | 118 // Notifies the View that the renderer has ceased to exist. |
143 virtual void RenderProcessGone(base::TerminationStatus status, | 119 virtual void RenderProcessGone(base::TerminationStatus status, |
144 int error_code) = 0; | 120 int error_code) = 0; |
145 | 121 |
146 // Tells the View to destroy itself. | 122 // Tells the View to destroy itself. |
147 virtual void Destroy() = 0; | 123 virtual void Destroy() = 0; |
148 | 124 |
149 // Tells the View that the tooltip text for the current mouse position over | 125 // Tells the View that the tooltip text for the current mouse position over |
150 // the page has changed. | 126 // the page has changed. |
151 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; | 127 virtual void SetTooltipText(const base::string16& tooltip_text) = 0; |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 | 326 |
351 // Returns an HWND that's given as the parent window for windowless Flash to | 327 // Returns an HWND that's given as the parent window for windowless Flash to |
352 // workaround crbug.com/301548. | 328 // workaround crbug.com/301548. |
353 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0; | 329 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0; |
354 #endif | 330 #endif |
355 }; | 331 }; |
356 | 332 |
357 } // namespace content | 333 } // namespace content |
358 | 334 |
359 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ | 335 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ |
OLD | NEW |