| 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_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 // never cache this pointer since it can become NULL if the renderer crashes, | 233 // never cache this pointer since it can become NULL if the renderer crashes, |
| 234 // instead you should always ask for it using the accessor. | 234 // instead you should always ask for it using the accessor. |
| 235 virtual RenderWidgetHostView* GetView() const = 0; | 235 virtual RenderWidgetHostView* GetView() const = 0; |
| 236 | 236 |
| 237 // Returns true if the renderer is loading, false if not. | 237 // Returns true if the renderer is loading, false if not. |
| 238 virtual bool IsLoading() const = 0; | 238 virtual bool IsLoading() const = 0; |
| 239 | 239 |
| 240 // Returns true if this is a RenderViewHost, false if not. | 240 // Returns true if this is a RenderViewHost, false if not. |
| 241 virtual bool IsRenderView() const = 0; | 241 virtual bool IsRenderView() const = 0; |
| 242 | 242 |
| 243 // This tells the renderer to paint into a bitmap and return it, | |
| 244 // regardless of whether the tab is hidden or not. It resizes the | |
| 245 // web widget to match the |page_size| and then returns the bitmap | |
| 246 // scaled so it matches the |desired_size|, so that the scaling | |
| 247 // happens on the rendering thread. When the bitmap is ready, the | |
| 248 // renderer sends a PaintAtSizeACK to this host, and a | |
| 249 // RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK notification is issued. | |
| 250 // Note that this bypasses most of the update logic that is normally invoked, | |
| 251 // and doesn't put the results into the backing store. | |
| 252 virtual void PaintAtSize(TransportDIB::Handle dib_handle, | |
| 253 int tag, | |
| 254 const gfx::Size& page_size, | |
| 255 const gfx::Size& desired_size) = 0; | |
| 256 | |
| 257 // Makes an IPC call to tell webkit to replace the currently selected word | 243 // Makes an IPC call to tell webkit to replace the currently selected word |
| 258 // or a word around the cursor. | 244 // or a word around the cursor. |
| 259 virtual void Replace(const base::string16& word) = 0; | 245 virtual void Replace(const base::string16& word) = 0; |
| 260 | 246 |
| 261 // Makes an IPC call to tell webkit to replace the misspelling in the current | 247 // Makes an IPC call to tell webkit to replace the misspelling in the current |
| 262 // selection. | 248 // selection. |
| 263 virtual void ReplaceMisspelling(const base::string16& word) = 0; | 249 virtual void ReplaceMisspelling(const base::string16& word) = 0; |
| 264 | 250 |
| 265 // Called to notify the RenderWidget that the resize rect has changed without | 251 // Called to notify the RenderWidget that the resize rect has changed without |
| 266 // the size of the RenderWidget itself changing. | 252 // the size of the RenderWidget itself changing. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 // within content/. This method is necessary because | 303 // within content/. This method is necessary because |
| 318 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 304 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
| 319 // subclasses inherit it virtually, which removes our ability to | 305 // subclasses inherit it virtually, which removes our ability to |
| 320 // static_cast to the subclass. | 306 // static_cast to the subclass. |
| 321 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 307 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
| 322 }; | 308 }; |
| 323 | 309 |
| 324 } // namespace content | 310 } // namespace content |
| 325 | 311 |
| 326 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 312 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |