| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| 7 | 7 |
| 8 #include "android_webview/browser/global_tile_manager.h" | 8 #include "android_webview/browser/global_tile_manager.h" |
| 9 #include "android_webview/browser/global_tile_manager_client.h" | 9 #include "android_webview/browser/global_tile_manager_client.h" |
| 10 #include "android_webview/browser/shared_renderer_state.h" | 10 #include "android_webview/browser/shared_renderer_state.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void OnAttachedToWindow(int width, int height); | 97 void OnAttachedToWindow(int width, int height); |
| 98 void OnDetachedFromWindow(); | 98 void OnDetachedFromWindow(); |
| 99 | 99 |
| 100 // Sets the scale for logical<->physical pixel conversions. | 100 // Sets the scale for logical<->physical pixel conversions. |
| 101 void SetDipScale(float dip_scale); | 101 void SetDipScale(float dip_scale); |
| 102 | 102 |
| 103 // Set the root layer scroll offset to |new_value|. | 103 // Set the root layer scroll offset to |new_value|. |
| 104 void ScrollTo(gfx::Vector2d new_value); | 104 void ScrollTo(gfx::Vector2d new_value); |
| 105 | 105 |
| 106 // Android views hierarchy gluing. | 106 // Android views hierarchy gluing. |
| 107 bool IsAttachedToWindow() const; | |
| 108 bool IsVisible() const; | 107 bool IsVisible() const; |
| 109 gfx::Rect GetScreenRect() const; | 108 gfx::Rect GetScreenRect() const; |
| 109 bool attached_to_window() const { return attached_to_window_; } |
| 110 bool hardware_enabled() const { return hardware_enabled_; } |
| 110 | 111 |
| 111 // Set the memory policy in shared renderer state and request the tiles from | 112 // Set the memory policy in shared renderer state and request the tiles from |
| 112 // GlobalTileManager. The actually amount of memory allowed by | 113 // GlobalTileManager. The actually amount of memory allowed by |
| 113 // GlobalTileManager may not be equal to what's requested in |policy|. | 114 // GlobalTileManager may not be equal to what's requested in |policy|. |
| 114 void RequestMemoryPolicy(content::SynchronousCompositorMemoryPolicy& policy); | 115 void RequestMemoryPolicy(content::SynchronousCompositorMemoryPolicy& policy); |
| 115 | 116 |
| 116 void TrimMemory(const int level, const bool visible); | 117 void TrimMemory(const int level, const bool visible); |
| 117 | 118 |
| 118 // SynchronousCompositorClient overrides | 119 // SynchronousCompositorClient overrides |
| 119 virtual void DidInitializeCompositor( | 120 virtual void DidInitializeCompositor( |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 // policy on the shared_renderer_state_ atomically. | 235 // policy on the shared_renderer_state_ atomically. |
| 235 size_t num_tiles_; | 236 size_t num_tiles_; |
| 236 size_t num_bytes_; | 237 size_t num_bytes_; |
| 237 | 238 |
| 238 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); | 239 DISALLOW_COPY_AND_ASSIGN(BrowserViewRenderer); |
| 239 }; | 240 }; |
| 240 | 241 |
| 241 } // namespace android_webview | 242 } // namespace android_webview |
| 242 | 243 |
| 243 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ | 244 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ |
| OLD | NEW |