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/scoped_nsobject.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 int selected_item, | 97 int selected_item, |
98 const std::vector<WebMenuItem>& items); | 98 const std::vector<WebMenuItem>& items); |
99 | 99 |
100 void KillSelf(); | 100 void KillSelf(); |
101 | 101 |
102 void set_parent_view(BaseView* parent_view) { parent_view_ = parent_view; } | 102 void set_parent_view(BaseView* parent_view) { parent_view_ = parent_view; } |
103 | 103 |
104 // These member variables should be private, but the associated ObjC class | 104 // These member variables should be private, but the associated ObjC class |
105 // needs access to them and can't be made a friend. | 105 // needs access to them and can't be made a friend. |
106 | 106 |
107 // The associated Model. | 107 // The associated Model. Can be NULL if Destroy() is called when |
| 108 // someone (other than superview) has retained |cocoa_view_|. |
108 RenderWidgetHost* render_widget_host_; | 109 RenderWidgetHost* render_widget_host_; |
109 | 110 |
110 // This is true when we are currently painting and thus should handle extra | 111 // This is true when we are currently painting and thus should handle extra |
111 // paint requests by expanding the invalid rect rather than actually painting. | 112 // paint requests by expanding the invalid rect rather than actually painting. |
112 bool about_to_validate_and_paint_; | 113 bool about_to_validate_and_paint_; |
113 | 114 |
114 // This is the rectangle which we'll paint. | 115 // This is the rectangle which we'll paint. |
115 NSRect invalid_rect_; | 116 NSRect invalid_rect_; |
116 | 117 |
117 // The time at which this view started displaying white pixels as a result of | 118 // The time at which this view started displaying white pixels as a result of |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 // Factory used to safely scope delayed calls to ShutdownHost(). | 152 // Factory used to safely scope delayed calls to ShutdownHost(). |
152 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; | 153 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; |
153 | 154 |
154 // Used for positioning a popup menu. | 155 // Used for positioning a popup menu. |
155 BaseView* parent_view_; | 156 BaseView* parent_view_; |
156 | 157 |
157 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 158 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
158 }; | 159 }; |
159 | 160 |
160 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 161 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
OLD | NEW |