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

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

Issue 150188: Use native Cocoa tooltips instead of Mozilla's ToolTip class. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/scoped_nsobject.h" 10 #include "base/scoped_nsobject.h"
(...skipping 17 matching lines...) Expand all
28 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles 28 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles
29 // but that means that the view needs to own the delegate and will dispose of it 29 // but that means that the view needs to own the delegate and will dispose of it
30 // when it's removed from the view system. 30 // when it's removed from the view system.
31 31
32 @interface RenderWidgetHostViewCocoa : BaseView <RenderWidgetHostViewMacOwner> { 32 @interface RenderWidgetHostViewCocoa : BaseView <RenderWidgetHostViewMacOwner> {
33 @private 33 @private
34 RenderWidgetHostViewMac* renderWidgetHostView_; 34 RenderWidgetHostViewMac* renderWidgetHostView_;
35 BOOL canBeKeyView_; 35 BOOL canBeKeyView_;
36 BOOL closeOnDeactivate_; 36 BOOL closeOnDeactivate_;
37 scoped_ptr<RWHVMEditCommandHelper> editCommand_helper_; 37 scoped_ptr<RWHVMEditCommandHelper> editCommand_helper_;
38
39 // These are part of the magic tooltip code from WebKit's WebHTMLView:
40 id trackingRectOwner_; // (not retained)
41 void *trackingRectUserData_;
42 NSTrackingRectTag lastToolTipTag_;
43 NSString* toolTip_;
38 } 44 }
39 45
40 - (void)setCanBeKeyView:(BOOL)can; 46 - (void)setCanBeKeyView:(BOOL)can;
41 - (void)setCloseOnDeactivate:(BOOL)b; 47 - (void)setCloseOnDeactivate:(BOOL)b;
48 - (void)setToolTipAtMousePoint:(NSString *)string;
42 49
43 @end 50 @end
44 51
45 /////////////////////////////////////////////////////////////////////////////// 52 ///////////////////////////////////////////////////////////////////////////////
46 // RenderWidgetHostViewMac 53 // RenderWidgetHostViewMac
47 // 54 //
48 // An object representing the "View" of a rendered web page. This object is 55 // An object representing the "View" of a rendered web page. This object is
49 // responsible for displaying the content of the web page, and integrating with 56 // responsible for displaying the content of the web page, and integrating with
50 // the Cocoa view system. It is the implementation of the RenderWidgetHostView 57 // the Cocoa view system. It is the implementation of the RenderWidgetHostView
51 // that the cross-platform RenderWidgetHost object uses 58 // that the cross-platform RenderWidgetHost object uses
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 141
135 // The cursor for the page. This is passed up from the renderer. 142 // The cursor for the page. This is passed up from the renderer.
136 WebCursor current_cursor_; 143 WebCursor current_cursor_;
137 144
138 // Indicates if the page is loading. 145 // Indicates if the page is loading.
139 bool is_loading_; 146 bool is_loading_;
140 147
141 // true if the View is not visible. 148 // true if the View is not visible.
142 bool is_hidden_; 149 bool is_hidden_;
143 150
144 // Tooltips
145 // The text to be shown in the tooltip, supplied by the renderer. 151 // The text to be shown in the tooltip, supplied by the renderer.
146 std::wstring tooltip_text_; 152 std::wstring tooltip_text_;
147 // Used to display tooltips. We can't use the [NSView -setToolTip:] methods
148 // because we need to be able to show and hide the tooltip without the mouse
149 // leaving a region and NSView isn't set up for that to happen.
150 scoped_nsobject<ToolTip> tooltip_;
151 153
152 // Factory used to safely scope delayed calls to ShutdownHost(). 154 // Factory used to safely scope delayed calls to ShutdownHost().
153 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; 155 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_;
154 156
155 // Used for positioning a popup menu. 157 // Used for positioning a popup menu.
156 BaseView* parent_view_; 158 BaseView* parent_view_;
157 159
158 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 160 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
159 }; 161 };
160 162
161 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 163 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698