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

Side by Side Diff: android_webview/browser/renderer_host/view_renderer_host.h

Issue 14888002: Android WebView Merged-Thread Hardware Draw (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 7 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_RENDER_HOST_VIEW_RENDERER_HOST_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_VIEW_RENDERER_HOST_H_
6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_VIEW_RENDERER_HOST_H_ 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_VIEW_RENDERER_HOST_H_
7 7
8 #include "base/threading/non_thread_safe.h" 8 #include "base/threading/non_thread_safe.h"
9 #include "content/public/browser/web_contents_observer.h" 9 #include "content/public/browser/web_contents_observer.h"
10 10
11 namespace android_webview { 11 namespace android_webview {
12 12
13 // Provides RenderViewHost wrapper functionality for sending WebView-specific 13 // Provides RenderViewHost wrapper functionality for sending WebView-specific
14 // IPC messages to the renderer and from there to WebKit. 14 // IPC messages to the renderer and from there to WebKit.
15 class ViewRendererHost : public content::WebContentsObserver, 15 class ViewRendererHost : public content::WebContentsObserver,
16 public base::NonThreadSafe { 16 public base::NonThreadSafe {
17 public: 17 public:
18 class Client { 18 class Client {
19 public: 19 public:
20 virtual void OnPictureUpdated(int process_id, int render_view_id) = 0; 20 virtual void OnPictureUpdated(int process_id, int render_view_id) = 0;
21 virtual void OnPageScaleFactorChanged(int process_id,
22 int render_view_id,
23 float page_scale_factor) = 0;
24 21
25 protected: 22 protected:
26 virtual ~Client() {} 23 virtual ~Client() {}
27 }; 24 };
28 25
29 ViewRendererHost(content::WebContents* contents, Client* client); 26 ViewRendererHost(content::WebContents* contents, Client* client);
30 virtual ~ViewRendererHost(); 27 virtual ~ViewRendererHost();
31 28
32 // Captures the latest available picture pile synchronously. 29 // Captures the latest available picture pile synchronously.
33 void CapturePictureSync(); 30 void CapturePictureSync();
34 31
35 // Enables updating picture piles on every new frame. 32 // Enables updating picture piles on every new frame.
36 // OnPictureUpdated is called when a new picture is available, 33 // OnPictureUpdated is called when a new picture is available,
37 // stored by renderer id in RendererPictureMap. 34 // stored by renderer id in RendererPictureMap.
38 void EnableCapturePictureCallback(bool enabled); 35 void EnableCapturePictureCallback(bool enabled);
39 36
40 using content::WebContentsObserver::Observe; 37 using content::WebContentsObserver::Observe;
41 38
42 private: 39 private:
43 // content::WebContentsObserver implementation. 40 // content::WebContentsObserver implementation.
44 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE; 41 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 42 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
46 43
47 void OnPictureUpdated(); 44 void OnPictureUpdated();
48 void OnDidActivateAcceleratedCompositing(int input_handler_id);
49 void OnPageScaleFactorChanged(float page_scale_factor);
50 45
51 bool IsRenderViewReady() const; 46 bool IsRenderViewReady() const;
52 47
53 Client* client_; 48 Client* client_;
54 }; 49 };
55 50
56 } // namespace android_webview 51 } // namespace android_webview
57 52
58 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_VIEW_RENDERER_HOST_H_ 53 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_VIEW_RENDERER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698