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

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

Issue 17593006: mac: Update clients of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: iwyu, scoped_nsprotocol 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>
11 #include <string> 11 #include <string>
12 #include <utility> 12 #include <utility>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/memory/scoped_nsobject.h" 15 #include "base/mac/scoped_nsobject.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" 19 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h"
20 #include "content/browser/renderer_host/render_widget_host_view_base.h" 20 #include "content/browser/renderer_host/render_widget_host_view_base.h"
21 #include "content/common/edit_command.h" 21 #include "content/common/edit_command.h"
22 #import "content/public/browser/render_widget_host_view_mac_base.h" 22 #import "content/public/browser/render_widget_host_view_mac_base.h"
23 #include "ipc/ipc_sender.h" 23 #include "ipc/ipc_sender.h"
24 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" 24 #include "third_party/WebKit/public/web/WebCompositionUnderline.h"
25 #include "ui/base/cocoa/base_view.h" 25 #include "ui/base/cocoa/base_view.h"
(...skipping 29 matching lines...) Expand all
55 BOOL canBeKeyView_; 55 BOOL canBeKeyView_;
56 BOOL takesFocusOnlyOnMouseDown_; 56 BOOL takesFocusOnlyOnMouseDown_;
57 BOOL closeOnDeactivate_; 57 BOOL closeOnDeactivate_;
58 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper> 58 scoped_ptr<content::RenderWidgetHostViewMacEditCommandHelper>
59 editCommand_helper_; 59 editCommand_helper_;
60 60
61 // These are part of the magic tooltip code from WebKit's WebHTMLView: 61 // These are part of the magic tooltip code from WebKit's WebHTMLView:
62 id trackingRectOwner_; // (not retained) 62 id trackingRectOwner_; // (not retained)
63 void* trackingRectUserData_; 63 void* trackingRectUserData_;
64 NSTrackingRectTag lastToolTipTag_; 64 NSTrackingRectTag lastToolTipTag_;
65 scoped_nsobject<NSString> toolTip_; 65 base::scoped_nsobject<NSString> toolTip_;
66 66
67 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up. 67 // Is YES if there was a mouse-down as yet unbalanced with a mouse-up.
68 BOOL hasOpenMouseDown_; 68 BOOL hasOpenMouseDown_;
69 69
70 NSWindow* lastWindow_; // weak 70 NSWindow* lastWindow_; // weak
71 71
72 // The cursor for the page. This is passed up from the renderer. 72 // The cursor for the page. This is passed up from the renderer.
73 scoped_nsobject<NSCursor> currentCursor_; 73 base::scoped_nsobject<NSCursor> currentCursor_;
74 74
75 // Variables used by our implementaion of the NSTextInput protocol. 75 // Variables used by our implementaion of the NSTextInput protocol.
76 // An input method of Mac calls the methods of this protocol not only to 76 // An input method of Mac calls the methods of this protocol not only to
77 // notify an application of its status, but also to retrieve the status of 77 // notify an application of its status, but also to retrieve the status of
78 // the application. That is, an application cannot control an input method 78 // the application. That is, an application cannot control an input method
79 // directly. 79 // directly.
80 // This object keeps the status of a composition of the renderer and returns 80 // This object keeps the status of a composition of the renderer and returns
81 // it when an input method asks for it. 81 // it when an input method asks for it.
82 // We need to implement Objective-C methods for the NSTextInput protocol. On 82 // We need to implement Objective-C methods for the NSTextInput protocol. On
83 // the other hand, we need to implement a C++ method for an IPC-message 83 // the other hand, we need to implement a C++ method for an IPC-message
84 // handler which receives input-method events from the renderer. 84 // handler which receives input-method events from the renderer.
85 85
86 // Represents the input-method attributes supported by this object. 86 // Represents the input-method attributes supported by this object.
87 scoped_nsobject<NSArray> validAttributesForMarkedText_; 87 base::scoped_nsobject<NSArray> validAttributesForMarkedText_;
88 88
89 // Indicates if we are currently handling a key down event. 89 // Indicates if we are currently handling a key down event.
90 BOOL handlingKeyDown_; 90 BOOL handlingKeyDown_;
91 91
92 // Indicates if there is any marked text. 92 // Indicates if there is any marked text.
93 BOOL hasMarkedText_; 93 BOOL hasMarkedText_;
94 94
95 // Indicates if unmarkText is called or not when handling a keyboard 95 // Indicates if unmarkText is called or not when handling a keyboard
96 // event. 96 // event.
97 BOOL unmarkTextCalled_; 97 BOOL unmarkTextCalled_;
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // value returns true for is_null() if we are not recording whiteout times. 392 // value returns true for is_null() if we are not recording whiteout times.
393 base::TimeTicks whiteout_start_time_; 393 base::TimeTicks whiteout_start_time_;
394 394
395 // The time it took after this view was selected for it to be fully painted. 395 // The time it took after this view was selected for it to be fully painted.
396 base::TimeTicks web_contents_switch_paint_time_; 396 base::TimeTicks web_contents_switch_paint_time_;
397 397
398 // Current text input type. 398 // Current text input type.
399 ui::TextInputType text_input_type_; 399 ui::TextInputType text_input_type_;
400 bool can_compose_inline_; 400 bool can_compose_inline_;
401 401
402 scoped_nsobject<CALayer> software_layer_; 402 base::scoped_nsobject<CALayer> software_layer_;
403 scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_; 403 base::scoped_nsobject<CompositingIOSurfaceLayer> compositing_iosurface_layer_;
404 scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_; 404 scoped_ptr<CompositingIOSurfaceMac> compositing_iosurface_;
405 405
406 // Whether to allow overlapping views. 406 // Whether to allow overlapping views.
407 bool allow_overlapping_views_; 407 bool allow_overlapping_views_;
408 408
409 // Whether to use the CoreAnimation path to draw content. 409 // Whether to use the CoreAnimation path to draw content.
410 bool use_core_animation_; 410 bool use_core_animation_;
411 411
412 ui::LatencyInfo software_latency_info_; 412 ui::LatencyInfo software_latency_info_;
413 413
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // The text to be shown in the tooltip, supplied by the renderer. 500 // The text to be shown in the tooltip, supplied by the renderer.
501 string16 tooltip_text_; 501 string16 tooltip_text_;
502 502
503 // Factory used to safely scope delayed calls to ShutdownHost(). 503 // Factory used to safely scope delayed calls to ShutdownHost().
504 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 504 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
505 505
506 // selected text on the renderer. 506 // selected text on the renderer.
507 std::string selected_text_; 507 std::string selected_text_;
508 508
509 // The window used for popup widgets. 509 // The window used for popup widgets.
510 scoped_nsobject<NSWindow> popup_window_; 510 base::scoped_nsobject<NSWindow> popup_window_;
511 511
512 // The fullscreen window used for pepper flash. 512 // The fullscreen window used for pepper flash.
513 scoped_nsobject<NSWindow> pepper_fullscreen_window_; 513 base::scoped_nsobject<NSWindow> pepper_fullscreen_window_;
514 scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_; 514 base::scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_;
515 // Our parent host view, if this is fullscreen. NULL otherwise. 515 // Our parent host view, if this is fullscreen. NULL otherwise.
516 RenderWidgetHostViewMac* fullscreen_parent_host_view_; 516 RenderWidgetHostViewMac* fullscreen_parent_host_view_;
517 517
518 // List of pending swaps for deferred acking: 518 // List of pending swaps for deferred acking:
519 // pairs of (route_id, gpu_host_id). 519 // pairs of (route_id, gpu_host_id).
520 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_; 520 std::list<std::pair<int32, int32> > pending_swap_buffers_acks_;
521 521
522 // Factory used to cancel outstanding throttled AckPendingSwapBuffers calls. 522 // Factory used to cancel outstanding throttled AckPendingSwapBuffers calls.
523 base::WeakPtrFactory<RenderWidgetHostViewMac> 523 base::WeakPtrFactory<RenderWidgetHostViewMac>
524 pending_swap_buffers_acks_weak_factory_; 524 pending_swap_buffers_acks_weak_factory_;
(...skipping 12 matching lines...) Expand all
537 537
538 // Subscriber that listens to frame presentation events. 538 // Subscriber that listens to frame presentation events.
539 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; 539 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_;
540 540
541 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 541 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
542 }; 542 };
543 543
544 } // namespace content 544 } // namespace content
545 545
546 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 546 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698