Chromium Code Reviews| 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_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 struct WebFindOptions; | 44 struct WebFindOptions; |
| 45 } | 45 } |
| 46 | 46 |
| 47 class BackingStore; | 47 class BackingStore; |
| 48 class PaintObserver; | 48 class PaintObserver; |
| 49 class RenderProcessHost; | 49 class RenderProcessHost; |
| 50 class RenderWidgetHostView; | 50 class RenderWidgetHostView; |
| 51 class TransportDIB; | 51 class TransportDIB; |
| 52 class WebCursor; | 52 class WebCursor; |
| 53 struct ViewHostMsg_UpdateRect_Params; | 53 struct ViewHostMsg_UpdateRect_Params; |
| 54 struct WebPreferences; | |
| 55 struct EditCommand; | |
| 56 class GURL; | |
| 54 | 57 |
| 55 // This class manages the browser side of a browser<->renderer HWND connection. | 58 // This class manages the browser side of a browser<->renderer HWND connection. |
| 56 // The HWND lives in the browser process, and windows events are sent over | 59 // The HWND lives in the browser process, and windows events are sent over |
| 57 // IPC to the corresponding object in the renderer. The renderer paints into | 60 // IPC to the corresponding object in the renderer. The renderer paints into |
| 58 // shared memory, which we transfer to a backing store and blit to the screen | 61 // shared memory, which we transfer to a backing store and blit to the screen |
| 59 // when Windows sends us a WM_PAINT message. | 62 // when Windows sends us a WM_PAINT message. |
| 60 // | 63 // |
| 61 // How Shutdown Works | 64 // How Shutdown Works |
| 62 // | 65 // |
| 63 // There are two situations in which this object, a RenderWidgetHost, can be | 66 // There are two situations in which this object, a RenderWidgetHost, can be |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 392 // into that frame's document. | 395 // into that frame's document. |
| 393 void InsertCSS(const string16& frame_xpath, const std::string& css); | 396 void InsertCSS(const string16& frame_xpath, const std::string& css); |
| 394 | 397 |
| 395 // Tells the renderer not to add scrollbars with height and width below a | 398 // Tells the renderer not to add scrollbars with height and width below a |
| 396 // threshold. | 399 // threshold. |
| 397 void DisableScrollbarsForThreshold(const gfx::Size& size); | 400 void DisableScrollbarsForThreshold(const gfx::Size& size); |
| 398 | 401 |
| 399 // Instructs the RenderView to send back updates to the preferred size. | 402 // Instructs the RenderView to send back updates to the preferred size. |
| 400 void EnablePreferredSizeMode(int flags); | 403 void EnablePreferredSizeMode(int flags); |
| 401 | 404 |
| 405 // Set the RenderView background. | |
| 406 void SetBackground(const SkBitmap& background); | |
| 407 | |
| 408 // Notifies the renderer that the next key event is bound to one or more | |
| 409 // pre-defined edit commands | |
| 410 void SetEditCommandsForNextKeyEvent( | |
| 411 const std::vector<EditCommand>& commands); | |
| 412 | |
| 413 // Relay a request from assistive technology to perform the default action | |
| 414 // on a given node. | |
| 415 void AccessibilityDoDefaultAction(int object_id); | |
| 416 | |
| 417 // Relay a request from assistive technology to set focus to a given node. | |
| 418 void AccessibilitySetFocus(int object_id); | |
| 419 | |
| 420 // Executes the edit command on the RenderView. | |
| 421 void ExecuteEditCommand(const std::string& command, | |
| 422 const std::string& value); | |
| 423 | |
| 424 // Tells the renderer to scroll the currently focused node into rect only if | |
| 425 // the currently focused node is a Text node (textfield, text area or content | |
| 426 // editable divs). | |
| 427 void ScrollFocusedEditableNodeIntoRect(const gfx::Rect& rect); | |
| 428 | |
| 429 // Requests the renderer to select the region between two points. | |
| 430 void SelectRange(const gfx::Point& start, const gfx::Point& end); | |
| 431 | |
| 432 // Edit operations. | |
| 433 void Undo(); | |
| 434 void Redo(); | |
| 435 void Cut(); | |
| 436 void Copy(); | |
| 437 void CopyToFindPboard(); | |
| 438 void Paste(); | |
| 439 void Delete(); | |
| 440 void SelectAll(); | |
| 441 | |
| 442 // Set the zoom level for the current main frame | |
| 443 void SetZoomLevel(double level); | |
|
jam
2011/09/21 00:10:53
looks like this can be on RVH?
| |
| 444 | |
| 445 #if defined(OS_MACOSX) | |
| 446 // Tell the renderer that plugin IME has completed. | |
| 447 void NotifyPluginImeCompletion(int plugin_id, const string16& status); | |
|
jam
2011/09/21 00:10:53
sorry, I just realized that these methods were add
| |
| 448 | |
| 449 // Activate/deactivate the RenderView (i.e., set its controls' tint | |
| 450 // accordingly, etc.). | |
| 451 void SetActive(bool active); | |
| 452 | |
| 453 // Let the RenderView know its window has changed visibility. | |
| 454 void SetWindowVisibility(bool visible); | |
| 455 | |
| 456 // Let the RenderView know its window's frame has changed. | |
| 457 void NotifyWindowFrameChanged(const gfx::Rect& window_frame, | |
| 458 const gfx::Rect& content_view_frame); | |
| 459 | |
| 460 // Sent to the renderer when the user starts or stops resizing the view. | |
| 461 void NotifyInLiveResize(bool resize); | |
| 462 | |
| 463 #endif // OS_MACOSX | |
| 464 | |
| 402 protected: | 465 protected: |
| 403 // Internal implementation of the public Forward*Event() methods. | 466 // Internal implementation of the public Forward*Event() methods. |
| 404 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, | 467 void ForwardInputEvent(const WebKit::WebInputEvent& input_event, |
| 405 int event_size, bool is_keyboard_shortcut); | 468 int event_size, bool is_keyboard_shortcut); |
| 406 | 469 |
| 407 // Called when we receive a notification indicating that the renderer | 470 // Called when we receive a notification indicating that the renderer |
| 408 // process has gone. This will reset our state so that our state will be | 471 // process has gone. This will reset our state so that our state will be |
| 409 // consistent if a new renderer is created. | 472 // consistent if a new renderer is created. |
| 410 void RendererExited(base::TerminationStatus status, int exit_code); | 473 void RendererExited(base::TerminationStatus status, int exit_code); |
| 411 | 474 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 701 | 764 |
| 702 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; | 765 std::vector<gfx::PluginWindowHandle> deferred_plugin_handles_; |
| 703 | 766 |
| 704 // The last scroll offset of the render widget. | 767 // The last scroll offset of the render widget. |
| 705 gfx::Point last_scroll_offset_; | 768 gfx::Point last_scroll_offset_; |
| 706 | 769 |
| 707 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); | 770 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHost); |
| 708 }; | 771 }; |
| 709 | 772 |
| 710 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ | 773 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ |
| OLD | NEW |