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

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

Issue 19693016: Hooking up setBackgroundColor from AwContents to render process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ity. Created 7 years, 5 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
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 6 #define ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
7 7
8 #include "content/public/browser/web_contents_observer.h" 8 #include "content/public/browser/web_contents_observer.h"
9 9
10 #include "android_webview/common/aw_hit_test_data.h" 10 #include "android_webview/common/aw_hit_test_data.h"
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "third_party/skia/include/core/SkColor.h"
13 14
14 class GURL; 15 class GURL;
15 16
16 namespace content { 17 namespace content {
17 struct FrameNavigateParams; 18 struct FrameNavigateParams;
18 struct LoadCommittedDetails; 19 struct LoadCommittedDetails;
19 } // namespace content 20 } // namespace content
20 21
21 namespace android_webview { 22 namespace android_webview {
22 23
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 64
64 // Sets the zoom level for text only. Used in layout modes other than 65 // Sets the zoom level for text only. Used in layout modes other than
65 // Text Autosizing. 66 // Text Autosizing.
66 void SetTextZoomLevel(double level); 67 void SetTextZoomLevel(double level);
67 68
68 void ResetScrollAndScaleState(); 69 void ResetScrollAndScaleState();
69 70
70 // Sets the initial page scale. This overrides initial scale set by 71 // Sets the initial page scale. This overrides initial scale set by
71 // the meta viewport tag. 72 // the meta viewport tag.
72 void SetInitialPageScale(double page_scale_factor); 73 void SetInitialPageScale(double page_scale_factor);
74 void SetBackgroundColor(SkColor c);
73 75
74 private: 76 private:
75 // content::WebContentsObserver implementation. 77 // content::WebContentsObserver implementation.
78 virtual void RenderViewCreated(content::RenderViewHost* view_host) OVERRIDE;
76 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; 79 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
77 virtual void DidNavigateAnyFrame( 80 virtual void DidNavigateAnyFrame(
78 const content::LoadCommittedDetails& details, 81 const content::LoadCommittedDetails& details,
79 const content::FrameNavigateParams& params) OVERRIDE; 82 const content::FrameNavigateParams& params) OVERRIDE;
80 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 83 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
81 84
82 void OnDocumentHasImagesResponse(int msg_id, bool has_images); 85 void OnDocumentHasImagesResponse(int msg_id, bool has_images);
83 void OnUpdateHitTestData(const AwHitTestData& hit_test_data); 86 void OnUpdateHitTestData(const AwHitTestData& hit_test_data);
84 void OnPageScaleFactorChanged(float page_scale_factor); 87 void OnPageScaleFactorChanged(float page_scale_factor);
85 88
86 bool IsRenderViewReady() const; 89 bool IsRenderViewReady() const;
87 90
88 AwRenderViewHostExtClient* client_; 91 AwRenderViewHostExtClient* client_;
89 92
93 SkColor background_color_;
94
90 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_; 95 std::map<int, DocumentHasImagesResult> pending_document_has_images_requests_;
91 96
92 // Master copy of hit test data on the browser side. This is updated 97 // Master copy of hit test data on the browser side. This is updated
93 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged 98 // as a result of DoHitTest called explicitly or when the FocusedNodeChanged
94 // is called in AwRenderViewExt. 99 // is called in AwRenderViewExt.
95 AwHitTestData last_hit_test_data_; 100 AwHitTestData last_hit_test_data_;
96 101
97 bool has_new_hit_test_data_; 102 bool has_new_hit_test_data_;
98 103
99 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt); 104 DISALLOW_COPY_AND_ASSIGN(AwRenderViewHostExt);
100 }; 105 };
101 106
102 } // namespace android_webview 107 } // namespace android_webview
103 108
104 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_ 109 #endif // ANDROID_WEBVIEW_BROWSER_RENDER_HOST_RENDER_VIEW_HOST_EXT_H_
OLDNEW
« no previous file with comments | « no previous file | android_webview/browser/renderer_host/aw_render_view_host_ext.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698