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

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

Issue 16189012: Add a path to use CALayers to display content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused method Created 7 years, 6 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) 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 <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 13 matching lines...) Expand all
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h" 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli ne.h"
25 #include "ui/base/cocoa/base_view.h" 25 #include "ui/base/cocoa/base_view.h"
26 #include "webkit/glue/webcursor.h" 26 #include "webkit/glue/webcursor.h"
27 27
28 namespace content { 28 namespace content {
29 class CompositingIOSurfaceMac; 29 class CompositingIOSurfaceMac;
30 class RenderWidgetHostViewMac; 30 class RenderWidgetHostViewMac;
31 class RenderWidgetHostViewMacEditCommandHelper; 31 class RenderWidgetHostViewMacEditCommandHelper;
32 } 32 }
33 33
34 @class CompositingIOSurfaceLayer;
34 @class FullscreenWindowManager; 35 @class FullscreenWindowManager;
35 @protocol RenderWidgetHostViewMacDelegate; 36 @protocol RenderWidgetHostViewMacDelegate;
36 @class ToolTip; 37 @class ToolTip;
37 38
38 @protocol RenderWidgetHostViewMacOwner 39 @protocol RenderWidgetHostViewMacOwner
39 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac; 40 - (content::RenderWidgetHostViewMac*)renderWidgetHostViewMac;
40 @end 41 @end
41 42
42 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, 43 // This is the view that lives in the Cocoa view hierarchy. In Windows-land,
43 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles 44 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 BOOL handlingGlobalFrameDidChange_; 141 BOOL handlingGlobalFrameDidChange_;
141 142
142 // The scale factor of the display this view is in. 143 // The scale factor of the display this view is in.
143 float deviceScaleFactor_; 144 float deviceScaleFactor_;
144 145
145 // If true then escape key down events are suppressed until the first escape 146 // If true then escape key down events are suppressed until the first escape
146 // key up event. (The up event is suppressed as well). This is used by the 147 // key up event. (The up event is suppressed as well). This is used by the
147 // flash fullscreen code to avoid sending a key up event without a matching 148 // flash fullscreen code to avoid sending a key up event without a matching
148 // key down event. 149 // key down event.
149 BOOL suppressNextEscapeKeyUp_; 150 BOOL suppressNextEscapeKeyUp_;
151
152 scoped_nsobject<CALayer> softwareLayer_;
150 } 153 }
151 154
152 @property(nonatomic, readonly) NSRange selectedRange; 155 @property(nonatomic, readonly) NSRange selectedRange;
153 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp; 156 @property(nonatomic, readonly) BOOL suppressNextEscapeKeyUp;
154 157
155 - (void)setCanBeKeyView:(BOOL)can; 158 - (void)setCanBeKeyView:(BOOL)can;
156 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b; 159 - (void)setTakesFocusOnlyOnMouseDown:(BOOL)b;
157 - (void)setCloseOnDeactivate:(BOOL)b; 160 - (void)setCloseOnDeactivate:(BOOL)b;
158 - (void)setToolTipAtMousePoint:(NSString *)string; 161 - (void)setToolTipAtMousePoint:(NSString *)string;
159 // True for always-on-top special windows (e.g. Balloons and Panels). 162 // True for always-on-top special windows (e.g. Balloons and Panels).
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 // value returns true for is_null() if we are not recording whiteout times. 387 // value returns true for is_null() if we are not recording whiteout times.
385 base::TimeTicks whiteout_start_time_; 388 base::TimeTicks whiteout_start_time_;
386 389
387 // The time it took after this view was selected for it to be fully painted. 390 // The time it took after this view was selected for it to be fully painted.
388 base::TimeTicks web_contents_switch_paint_time_; 391 base::TimeTicks web_contents_switch_paint_time_;
389 392
390 // Current text input type. 393 // Current text input type.
391 ui::TextInputType text_input_type_; 394 ui::TextInputType text_input_type_;
392 bool can_compose_inline_; 395 bool can_compose_inline_;
393 396
397 scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
394 scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_; 398 scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
395 399
396 // Whether to allow overlapping views. 400 // Whether to allow overlapping views.
397 bool allow_overlapping_views_; 401 bool allow_overlapping_views_;
398 402
403 // Used to test the CoreAnimation path.
Avi (use Gerrit) 2013/05/31 23:59:58 // Whether to use the CoreAnimation path.
ccameron 2013/06/01 00:29:45 Done.
404 bool use_core_animation_;
405
399 NSWindow* pepper_fullscreen_window() const { 406 NSWindow* pepper_fullscreen_window() const {
400 return pepper_fullscreen_window_; 407 return pepper_fullscreen_window_;
401 } 408 }
402 409
403 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing(); 410 CONTENT_EXPORT void release_pepper_fullscreen_window_for_testing();
404 411
405 RenderWidgetHostViewMac* fullscreen_parent_host_view() const { 412 RenderWidgetHostViewMac* fullscreen_parent_host_view() const {
406 return fullscreen_parent_host_view_; 413 return fullscreen_parent_host_view_;
407 } 414 }
408 415
409 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const { 416 RenderWidgetHostViewFrameSubscriber* frame_subscriber() const {
410 return frame_subscriber_.get(); 417 return frame_subscriber_.get();
411 } 418 }
412 419
413 int window_number() const; 420 int window_number() const;
414 421
422 float scale_factor() const;
423
424 bool is_hidden() const { return is_hidden_; }
425
415 private: 426 private:
416 friend class RenderWidgetHostView; 427 friend class RenderWidgetHostView;
417 friend class RenderWidgetHostViewMacTest; 428 friend class RenderWidgetHostViewMacTest;
418 429
419 // The view will associate itself with the given widget. The native view must 430 // The view will associate itself with the given widget. The native view must
420 // be hooked up immediately to the view hierarchy, or else when it is 431 // be hooked up immediately to the view hierarchy, or else when it is
421 // deleted it will delete this out from under the caller. 432 // deleted it will delete this out from under the caller.
422 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); 433 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget);
423 434
424 // Returns whether this render view is a popup (autocomplete window). 435 // Returns whether this render view is a popup (autocomplete window).
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 503
493 // Subscriber that listens to frame presentation events. 504 // Subscriber that listens to frame presentation events.
494 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; 505 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
495 506
496 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 507 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
497 }; 508 };
498 509
499 } // namespace content 510 } // namespace content
500 511
501 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 512 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698