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

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

Issue 2702153003: [content] Fix background color update handling in RWHVAura. (Closed)
Patch Set: rebase: employ same mechanism in RWHVMac. Created 3 years, 8 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_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurface.h> 9 #include <IOSurface/IOSurface.h>
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 void WasOccluded() override; 270 void WasOccluded() override;
271 gfx::Rect GetViewBounds() const override; 271 gfx::Rect GetViewBounds() const override;
272 void SetShowingContextMenu(bool showing) override; 272 void SetShowingContextMenu(bool showing) override;
273 void SetActive(bool active) override; 273 void SetActive(bool active) override;
274 void ShowDefinitionForSelection() override; 274 void ShowDefinitionForSelection() override;
275 bool SupportsSpeech() const override; 275 bool SupportsSpeech() const override;
276 void SpeakSelection() override; 276 void SpeakSelection() override;
277 bool IsSpeaking() const override; 277 bool IsSpeaking() const override;
278 void StopSpeaking() override; 278 void StopSpeaking() override;
279 void SetBackgroundColor(SkColor color) override; 279 void SetBackgroundColor(SkColor color) override;
280 SkColor background_color() const override;
280 void SetNeedsBeginFrames(bool needs_begin_frames) override; 281 void SetNeedsBeginFrames(bool needs_begin_frames) override;
281 282
282 // Implementation of RenderWidgetHostViewBase. 283 // Implementation of RenderWidgetHostViewBase.
283 void InitAsPopup(RenderWidgetHostView* parent_host_view, 284 void InitAsPopup(RenderWidgetHostView* parent_host_view,
284 const gfx::Rect& pos) override; 285 const gfx::Rect& pos) override;
285 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override; 286 void InitAsFullscreen(RenderWidgetHostView* reference_host_view) override;
286 void Focus() override; 287 void Focus() override;
287 void UpdateCursor(const WebCursor& cursor) override; 288 void UpdateCursor(const WebCursor& cursor) override;
288 void SetIsLoading(bool is_loading) override; 289 void SetIsLoading(bool is_loading) override;
289 void RenderProcessGone(base::TerminationStatus status, 290 void RenderProcessGone(base::TerminationStatus status,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range, 399 gfx::Rect GetFirstRectForCompositionRange(const gfx::Range& range,
399 gfx::Range* actual_range); 400 gfx::Range* actual_range);
400 401
401 // Converts from given whole character range to composition oriented range. If 402 // Converts from given whole character range to composition oriented range. If
402 // the conversion failed, return gfx::Range::InvalidRange. 403 // the conversion failed, return gfx::Range::InvalidRange.
403 gfx::Range ConvertCharacterRangeToCompositionRange( 404 gfx::Range ConvertCharacterRangeToCompositionRange(
404 const gfx::Range& request_range); 405 const gfx::Range& request_range);
405 406
406 WebContents* GetWebContents(); 407 WebContents* GetWebContents();
407 408
409 // Applies background color without notifying the RenderWidget about
410 // opaqueness changes.
411 void UpdateBackgroundColorFromRenderer(SkColor color);
412
408 // These member variables should be private, but the associated ObjC class 413 // These member variables should be private, but the associated ObjC class
409 // needs access to them and can't be made a friend. 414 // needs access to them and can't be made a friend.
410 415
411 // The associated Model. Can be NULL if Destroy() is called when 416 // The associated Model. Can be NULL if Destroy() is called when
412 // someone (other than superview) has retained |cocoa_view_|. 417 // someone (other than superview) has retained |cocoa_view_|.
413 RenderWidgetHostImpl* render_widget_host_; 418 RenderWidgetHostImpl* render_widget_host_;
414 419
415 // The background CoreAnimation layer which is hosted by |cocoa_view_|. 420 // The background CoreAnimation layer which is hosted by |cocoa_view_|.
416 base::scoped_nsobject<CALayer> background_layer_; 421 base::scoped_nsobject<CALayer> background_layer_;
417 422
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter. 550 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter.
546 base::TimeTicks vsync_timebase_; 551 base::TimeTicks vsync_timebase_;
547 base::TimeDelta vsync_interval_; 552 base::TimeDelta vsync_interval_;
548 553
549 // Whether a request for begin frames has been issued. 554 // Whether a request for begin frames has been issued.
550 bool needs_begin_frames_; 555 bool needs_begin_frames_;
551 556
552 // Whether a request to flush input has been issued. 557 // Whether a request to flush input has been issued.
553 bool needs_flush_input_; 558 bool needs_flush_input_;
554 559
560 // The background color of the web content.
561 SkColor background_color_;
562
555 // Factory used to safely scope delayed calls to ShutdownHost(). 563 // Factory used to safely scope delayed calls to ShutdownHost().
556 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 564 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
557 565
558 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 566 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
559 }; 567 };
560 568
561 } // namespace content 569 } // namespace content
562 570
563 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 571 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698