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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_android.h

Issue 975293004: Start caching the theme color in web_contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 void Destroy() override; 132 void Destroy() override;
133 void SetTooltipText(const base::string16& tooltip_text) override; 133 void SetTooltipText(const base::string16& tooltip_text) override;
134 void SelectionChanged(const base::string16& text, 134 void SelectionChanged(const base::string16& text,
135 size_t offset, 135 size_t offset,
136 const gfx::Range& range) override; 136 const gfx::Range& range) override;
137 void SelectionBoundsChanged( 137 void SelectionBoundsChanged(
138 const ViewHostMsg_SelectionBounds_Params& params) override; 138 const ViewHostMsg_SelectionBounds_Params& params) override;
139 void AcceleratedSurfaceInitialized(int route_id) override; 139 void AcceleratedSurfaceInitialized(int route_id) override;
140 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 140 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
141 void SetBackgroundColor(SkColor color) override; 141 void SetBackgroundColor(SkColor color) override;
142 void SetThemeColor(SkColor color) override;
142 void CopyFromCompositingSurface(const gfx::Rect& src_subrect, 143 void CopyFromCompositingSurface(const gfx::Rect& src_subrect,
143 const gfx::Size& dst_size, 144 const gfx::Size& dst_size,
144 ReadbackRequestCallback& callback, 145 ReadbackRequestCallback& callback,
145 const SkColorType color_type) override; 146 const SkColorType color_type) override;
146 void CopyFromCompositingSurfaceToVideoFrame( 147 void CopyFromCompositingSurfaceToVideoFrame(
147 const gfx::Rect& src_subrect, 148 const gfx::Rect& src_subrect,
148 const scoped_refptr<media::VideoFrame>& target, 149 const scoped_refptr<media::VideoFrame>& target,
149 const base::Callback<void(bool)>& callback) override; 150 const base::Callback<void(bool)>& callback) override;
150 bool CanCopyToVideoFrame() const override; 151 bool CanCopyToVideoFrame() const override;
151 void GetScreenInfo(blink::WebScreenInfo* results) override; 152 void GetScreenInfo(blink::WebScreenInfo* results) override;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 void GetScaledContentBitmap(float scale, 242 void GetScaledContentBitmap(float scale,
242 SkColorType color_type, 243 SkColorType color_type,
243 gfx::Rect src_subrect, 244 gfx::Rect src_subrect,
244 ReadbackRequestCallback& result_callback); 245 ReadbackRequestCallback& result_callback);
245 246
246 scoped_refptr<cc::DelegatedRendererLayer> 247 scoped_refptr<cc::DelegatedRendererLayer>
247 CreateDelegatedLayerForFrameProvider() const; 248 CreateDelegatedLayerForFrameProvider() const;
248 249
249 bool HasValidFrame() const; 250 bool HasValidFrame() const;
250 251
252 SkColor GetThemeColor() const;
253
251 void MoveCaret(const gfx::Point& point); 254 void MoveCaret(const gfx::Point& point);
252 void DismissTextHandles(); 255 void DismissTextHandles();
253 void SetTextHandlesTemporarilyHidden(bool hidden); 256 void SetTextHandlesTemporarilyHidden(bool hidden);
254 void OnShowingPastePopup(const gfx::PointF& point); 257 void OnShowingPastePopup(const gfx::PointF& point);
255 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip); 258 void OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip);
256 259
257 void SynchronousFrameMetadata( 260 void SynchronousFrameMetadata(
258 const cc::CompositorFrameMetadata& frame_metadata); 261 const cc::CompositorFrameMetadata& frame_metadata);
259 262
260 void SetOverlayVideoMode(bool enabled); 263 void SetOverlayVideoMode(bool enabled);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 bool is_showing_; 345 bool is_showing_;
343 346
344 // ContentViewCoreImpl is our interface to the view system. 347 // ContentViewCoreImpl is our interface to the view system.
345 ContentViewCoreImpl* content_view_core_; 348 ContentViewCoreImpl* content_view_core_;
346 349
347 ImeAdapterAndroid ime_adapter_android_; 350 ImeAdapterAndroid ime_adapter_android_;
348 351
349 // Body background color of the underlying document. 352 // Body background color of the underlying document.
350 SkColor cached_background_color_; 353 SkColor cached_background_color_;
351 354
355 // Theme color for the underlying document.
356 SkColor cached_theme_color_;
357
352 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_; 358 scoped_refptr<cc::DelegatedFrameResourceCollection> resource_collection_;
353 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_; 359 scoped_refptr<cc::DelegatedFrameProvider> frame_provider_;
354 scoped_refptr<cc::DelegatedRendererLayer> layer_; 360 scoped_refptr<cc::DelegatedRendererLayer> layer_;
355 361
356 // The most recent texture size that was pushed to the texture layer. 362 // The most recent texture size that was pushed to the texture layer.
357 gfx::Size texture_size_in_layer_; 363 gfx::Size texture_size_in_layer_;
358 364
359 // The most recent content size that was pushed to the texture layer. 365 // The most recent content size that was pushed to the texture layer.
360 gfx::Size content_size_in_layer_; 366 gfx::Size content_size_in_layer_;
361 367
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 gfx::Vector2dF last_scroll_offset_; 416 gfx::Vector2dF last_scroll_offset_;
411 417
412 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_; 418 base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
413 419
414 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid); 420 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAndroid);
415 }; 421 };
416 422
417 } // namespace content 423 } // namespace content
418 424
419 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_ 425 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698