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

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

Issue 2739113002: Simplify calls for scale factor (Closed)
Patch Set: fix mac tests Created 3 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_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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 } 424 }
425 425
426 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing(); 426 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing();
427 427
428 RenderWidgetHostViewMac* fullscreen_parent_host_view() const { 428 RenderWidgetHostViewMac* fullscreen_parent_host_view() const {
429 return fullscreen_parent_host_view_; 429 return fullscreen_parent_host_view_;
430 } 430 }
431 431
432 int window_number() const; 432 int window_number() const;
433 433
434 // The scale factor for the screen that the view is currently on.
435 float ViewScaleFactor() const;
436
437 // Update properties, such as the scale factor for the backing store 434 // Update properties, such as the scale factor for the backing store
438 // and for any CALayers, and the screen color profile. 435 // and for any CALayers, and the screen color profile.
439 void UpdateBackingStoreProperties(); 436 void UpdateBackingStoreProperties();
440 437
441 // Ensure that the display link is associated with the correct display. 438 // Ensure that the display link is associated with the correct display.
442 void UpdateDisplayLink(); 439 void UpdateDisplayLink();
443 440
444 void PauseForPendingResizeOrRepaintsAndDraw(); 441 void PauseForPendingResizeOrRepaintsAndDraw();
445 442
446 // BrowserCompositorMacClient implementation. 443 // BrowserCompositorMacClient implementation.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter. 543 // to SendVSyncParametersToRenderer(), and refreshed regularly thereafter.
547 base::TimeTicks vsync_timebase_; 544 base::TimeTicks vsync_timebase_;
548 base::TimeDelta vsync_interval_; 545 base::TimeDelta vsync_interval_;
549 546
550 // Whether a request for begin frames has been issued. 547 // Whether a request for begin frames has been issued.
551 bool needs_begin_frames_; 548 bool needs_begin_frames_;
552 549
553 // Whether a request to flush input has been issued. 550 // Whether a request to flush input has been issued.
554 bool needs_flush_input_; 551 bool needs_flush_input_;
555 552
553 // Device scale factor. Updated when the display metric is updated.
554 float device_scale_factor_;
555
556 // Factory used to safely scope delayed calls to ShutdownHost(). 556 // Factory used to safely scope delayed calls to ShutdownHost().
557 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 557 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
558 558
559 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 559 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
560 }; 560 };
561 561
562 } // namespace content 562 } // namespace content
563 563
564 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 564 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698