| 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/keyboard_listener.h" |   10 #include "content/public/browser/keyboard_listener.h" | 
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  277   // Add a keyboard listener that can handle key presses without requiring |  277   // Add a keyboard listener that can handle key presses without requiring | 
|  278   // focus. |  278   // focus. | 
|  279   virtual void AddKeyboardListener(KeyboardListener* listener) = 0; |  279   virtual void AddKeyboardListener(KeyboardListener* listener) = 0; | 
|  280  |  280  | 
|  281   // Remove a keyboard listener. |  281   // Remove a keyboard listener. | 
|  282   virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; |  282   virtual void RemoveKeyboardListener(KeyboardListener* listener) = 0; | 
|  283  |  283  | 
|  284   // Get the screen info corresponding to this render widget. |  284   // Get the screen info corresponding to this render widget. | 
|  285   virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0; |  285   virtual void GetWebScreenInfo(WebKit::WebScreenInfo* result) = 0; | 
|  286  |  286  | 
 |  287   // Grabs snapshot from renderer side and returns the bitmap to a callback. | 
 |  288   // If |src_rect| is empty, the whole contents is copied. This is an expensive | 
 |  289   // operation due to the IPC, but it can be used as a fallback method when | 
 |  290   // CopyFromBackingStore fails due to the backing store not being available or, | 
 |  291   // in composited mode, when the accelerated surface is not available to the | 
 |  292   // browser side. | 
 |  293   virtual void GetSnapshotFromRenderer( | 
 |  294       const gfx::Rect& src_subrect, | 
 |  295       const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; | 
 |  296  | 
|  287  protected: |  297  protected: | 
|  288   friend class RenderWidgetHostImpl; |  298   friend class RenderWidgetHostImpl; | 
|  289  |  299  | 
|  290   // Retrieves the implementation class.  Intended only for code |  300   // Retrieves the implementation class.  Intended only for code | 
|  291   // within content/.  This method is necessary because |  301   // within content/.  This method is necessary because | 
|  292   // RenderWidgetHost is the root of a diamond inheritance pattern, so |  302   // RenderWidgetHost is the root of a diamond inheritance pattern, so | 
|  293   // subclasses inherit it virtually, which removes our ability to |  303   // subclasses inherit it virtually, which removes our ability to | 
|  294   // static_cast to the subclass. |  304   // static_cast to the subclass. | 
|  295   virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |  305   virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 
|  296 }; |  306 }; | 
|  297  |  307  | 
|  298 }  // namespace content |  308 }  // namespace content | 
|  299  |  309  | 
|  300 #endif  // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |  310 #endif  // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 
| OLD | NEW |