Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/task.h" | 11 #include "base/task.h" |
| 11 #include "base/time.h" | 12 #include "base/time.h" |
| 12 #include "chrome/browser/cocoa/base_view.h" | 13 #include "chrome/browser/cocoa/base_view.h" |
| 13 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 14 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 14 #include "webkit/glue/webcursor.h" | 15 #include "webkit/glue/webcursor.h" |
| 15 | 16 |
| 16 class RenderWidgetHostViewMac; | 17 class RenderWidgetHostViewMac; |
| 18 @class ToolTip; | |
| 17 | 19 |
| 18 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, | 20 // This is the view that lives in the Cocoa view hierarchy. In Windows-land, |
| 19 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles | 21 // RenderWidgetHostViewWin is both the view and the delegate. We split the roles |
| 20 // but that means that the view needs to own the delegate and will dispose of it | 22 // but that means that the view needs to own the delegate and will dispose of it |
| 21 // when it's removed from the view system. | 23 // when it's removed from the view system. |
| 22 | 24 |
| 23 @interface RenderWidgetHostViewCocoa : BaseView { | 25 @interface RenderWidgetHostViewCocoa : BaseView { |
| 24 @private | 26 @private |
| 25 RenderWidgetHostViewMac* renderWidgetHostView_; | 27 RenderWidgetHostViewMac* renderWidgetHostView_; |
| 26 BOOL canBeKeyView_; | 28 BOOL canBeKeyView_; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 126 | 128 |
| 127 // Indicates if the page is loading. | 129 // Indicates if the page is loading. |
| 128 bool is_loading_; | 130 bool is_loading_; |
| 129 | 131 |
| 130 // true if the View is not visible. | 132 // true if the View is not visible. |
| 131 bool is_hidden_; | 133 bool is_hidden_; |
| 132 | 134 |
| 133 // Tooltips | 135 // Tooltips |
| 134 // The text to be shown in the tooltip, supplied by the renderer. | 136 // The text to be shown in the tooltip, supplied by the renderer. |
| 135 std::wstring tooltip_text_; | 137 std::wstring tooltip_text_; |
| 138 // Used to display tooltips. We can't use the [NSView -setToolTip:] methods | |
| 139 // because we need to be able to show and hide the tooltip without the mouse | |
| 140 // leaving the view and NSView isn't set up for that to happen. | |
|
stuartmorgan
2009/06/15 16:52:26
s/the view/a region/ to make it more clear why we
| |
| 141 scoped_nsobject<ToolTip> tooltip_; | |
| 136 | 142 |
| 137 // Factory used to safely scope delayed calls to ShutdownHost(). | 143 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 138 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; | 144 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; |
| 139 | 145 |
| 140 // Used for positioning a popup menu. | 146 // Used for positioning a popup menu. |
| 141 BaseView* parent_view_; | 147 BaseView* parent_view_; |
| 142 | 148 |
| 143 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 149 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 144 }; | 150 }; |
| 145 | 151 |
| 146 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 152 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |