Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: android_webview/browser/browser_view_renderer.h

Issue 25082006: [Android WebView] OnMemoryPressure to drop tile memory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/android/scoped_java_ref.h" 8 #include "base/android/scoped_java_ref.h"
9 #include "base/memory/memory_pressure_listener.h"
9 #include "skia/ext/refptr.h" 10 #include "skia/ext/refptr.h"
10 #include "ui/gfx/point.h" 11 #include "ui/gfx/point.h"
11 #include "ui/gfx/rect.h" 12 #include "ui/gfx/rect.h"
12 #include "ui/gfx/vector2d_f.h" 13 #include "ui/gfx/vector2d_f.h"
13 14
14 class SkPicture; 15 class SkPicture;
15 struct AwDrawGLInfo; 16 struct AwDrawGLInfo;
16 struct AwDrawSWFunctionTable; 17 struct AwDrawSWFunctionTable;
17 18
18 namespace content { 19 namespace content {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const gfx::Vector2d& scroll, 111 const gfx::Vector2d& scroll,
111 const gfx::Rect& clip) = 0; 112 const gfx::Rect& clip) = 0;
112 113
113 // Called in response to a prior Client::RequestDrawGL() call. See 114 // Called in response to a prior Client::RequestDrawGL() call. See
114 // AwDrawGLInfo documentation for more details of the contract. 115 // AwDrawGLInfo documentation for more details of the contract.
115 virtual void DrawGL(AwDrawGLInfo* draw_info) = 0; 116 virtual void DrawGL(AwDrawGLInfo* draw_info) = 0;
116 117
117 // The global visible rect changed and this is the new value. 118 // The global visible rect changed and this is the new value.
118 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) = 0; 119 virtual void SetGlobalVisibleRect(const gfx::Rect& visible_rect) = 0;
119 120
121 virtual void OnMemoryPressure(
122 base::MemoryPressureListener::MemoryPressureLevel
123 memory_pressure_level) = 0;
124
120 // CapturePicture API methods. 125 // CapturePicture API methods.
121 virtual skia::RefPtr<SkPicture> CapturePicture(int width, int height) = 0; 126 virtual skia::RefPtr<SkPicture> CapturePicture(int width, int height) = 0;
122 virtual void EnableOnNewPicture(bool enabled) = 0; 127 virtual void EnableOnNewPicture(bool enabled) = 0;
123 128
124 // View update notifications. 129 // View update notifications.
125 virtual void SetIsPaused(bool paused) = 0; 130 virtual void SetIsPaused(bool paused) = 0;
126 virtual void SetViewVisibility(bool visible) = 0; 131 virtual void SetViewVisibility(bool visible) = 0;
127 virtual void SetWindowVisibility(bool visible) = 0; 132 virtual void SetWindowVisibility(bool visible) = 0;
128 virtual void OnSizeChanged(int width, int height) = 0; 133 virtual void OnSizeChanged(int width, int height) = 0;
129 virtual void OnAttachedToWindow(int width, int height) = 0; 134 virtual void OnAttachedToWindow(int width, int height) = 0;
130 virtual void OnDetachedFromWindow() = 0; 135 virtual void OnDetachedFromWindow() = 0;
131 136
132 // Sets the scale for logical<->physical pixel conversions. 137 // Sets the scale for logical<->physical pixel conversions.
133 virtual void SetDipScale(float dip_scale) = 0; 138 virtual void SetDipScale(float dip_scale) = 0;
134 139
135 // Set the root layer scroll offset to |new_value|. 140 // Set the root layer scroll offset to |new_value|.
136 virtual void ScrollTo(gfx::Vector2d new_value) = 0; 141 virtual void ScrollTo(gfx::Vector2d new_value) = 0;
137 142
138 // Android views hierarchy gluing. 143 // Android views hierarchy gluing.
139 virtual bool IsAttachedToWindow() = 0; 144 virtual bool IsAttachedToWindow() = 0;
140 virtual bool IsVisible() = 0; 145 virtual bool IsVisible() = 0;
141 virtual gfx::Rect GetScreenRect() = 0; 146 virtual gfx::Rect GetScreenRect() = 0;
142 147
143 virtual ~BrowserViewRenderer() {} 148 virtual ~BrowserViewRenderer() {}
144 }; 149 };
145 150
146 } // namespace android_webview 151 } // namespace android_webview
147 152
148 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_ 153 #endif // ANDROID_WEBVIEW_BROWSER_BROWSER_VIEW_RENDERER_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/gl_view_renderer_manager.h » ('j') | android_webview/browser/gl_view_renderer_manager.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698