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_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 // into that frame's document. | 435 // into that frame's document. |
436 void InsertCSS(const string16& frame_xpath, const std::string& css); | 436 void InsertCSS(const string16& frame_xpath, const std::string& css); |
437 | 437 |
438 // Tells the renderer not to add scrollbars with height and width below a | 438 // Tells the renderer not to add scrollbars with height and width below a |
439 // threshold. | 439 // threshold. |
440 void DisableScrollbarsForThreshold(const gfx::Size& size); | 440 void DisableScrollbarsForThreshold(const gfx::Size& size); |
441 | 441 |
442 // Instructs the RenderView to send back updates to the preferred size. | 442 // Instructs the RenderView to send back updates to the preferred size. |
443 void EnablePreferredSizeMode(); | 443 void EnablePreferredSizeMode(); |
444 | 444 |
| 445 // Instructs the RenderView to automatically resize and send back updates |
| 446 // for the new size. |
| 447 void EnableAutoResize(const gfx::Size& min_size, const gfx::Size& max_size); |
| 448 |
445 // Executes custom context menu action that was provided from WebKit. | 449 // Executes custom context menu action that was provided from WebKit. |
446 void ExecuteCustomContextMenuCommand( | 450 void ExecuteCustomContextMenuCommand( |
447 int action, const webkit_glue::CustomContextMenuContext& context); | 451 int action, const webkit_glue::CustomContextMenuContext& context); |
448 | 452 |
449 // Let the renderer know that the menu has been closed. | 453 // Let the renderer know that the menu has been closed. |
450 void NotifyContextMenuClosed( | 454 void NotifyContextMenuClosed( |
451 const webkit_glue::CustomContextMenuContext& context); | 455 const webkit_glue::CustomContextMenuContext& context); |
452 | 456 |
453 // Copies the image at location x, y to the clipboard (if there indeed is an | 457 // Copies the image at location x, y to the clipboard (if there indeed is an |
454 // image at that location). | 458 // image at that location). |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 void RemoveObserver(content::RenderViewHostObserver* observer); | 492 void RemoveObserver(content::RenderViewHostObserver* observer); |
489 | 493 |
490 // RenderWidgetHost protected overrides. | 494 // RenderWidgetHost protected overrides. |
491 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | 495 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
492 bool* is_keyboard_shortcut) OVERRIDE; | 496 bool* is_keyboard_shortcut) OVERRIDE; |
493 virtual void UnhandledKeyboardEvent( | 497 virtual void UnhandledKeyboardEvent( |
494 const NativeWebKeyboardEvent& event) OVERRIDE; | 498 const NativeWebKeyboardEvent& event) OVERRIDE; |
495 virtual void OnUserGesture() OVERRIDE; | 499 virtual void OnUserGesture() OVERRIDE; |
496 virtual void NotifyRendererUnresponsive() OVERRIDE; | 500 virtual void NotifyRendererUnresponsive() OVERRIDE; |
497 virtual void NotifyRendererResponsive() OVERRIDE; | 501 virtual void NotifyRendererResponsive() OVERRIDE; |
| 502 virtual void OnRenderAutoResized(const gfx::Size& size) OVERRIDE; |
498 virtual void RequestToLockMouse() OVERRIDE; | 503 virtual void RequestToLockMouse() OVERRIDE; |
499 virtual bool IsFullscreen() const OVERRIDE; | 504 virtual bool IsFullscreen() const OVERRIDE; |
500 virtual void OnMsgFocus() OVERRIDE; | 505 virtual void OnMsgFocus() OVERRIDE; |
501 virtual void OnMsgBlur() OVERRIDE; | 506 virtual void OnMsgBlur() OVERRIDE; |
502 | 507 |
503 // IPC message handlers. | 508 // IPC message handlers. |
504 void OnMsgShowView(int route_id, | 509 void OnMsgShowView(int route_id, |
505 WindowOpenDisposition disposition, | 510 WindowOpenDisposition disposition, |
506 const gfx::Rect& initial_pos, | 511 const gfx::Rect& initial_pos, |
507 bool user_gesture); | 512 bool user_gesture); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; | 680 typedef std::map<int64, PowerSaveBlocker*> PowerSaveBlockerMap; |
676 PowerSaveBlockerMap power_save_blockers_; | 681 PowerSaveBlockerMap power_save_blockers_; |
677 | 682 |
678 // A list of observers that filter messages. Weak references. | 683 // A list of observers that filter messages. Weak references. |
679 ObserverList<content::RenderViewHostObserver> observers_; | 684 ObserverList<content::RenderViewHostObserver> observers_; |
680 | 685 |
681 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); | 686 DISALLOW_COPY_AND_ASSIGN(RenderViewHost); |
682 }; | 687 }; |
683 | 688 |
684 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ | 689 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_H_ |
OLD | NEW |