| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 #import <QuartzCore/CALayer.h> | 10 #import <QuartzCore/CALayer.h> |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 void KillSelf(); | 260 void KillSelf(); |
| 261 | 261 |
| 262 void SetTextInputActive(bool active); | 262 void SetTextInputActive(bool active); |
| 263 | 263 |
| 264 // Sends confirmed plugin IME text back to the renderer. | 264 // Sends confirmed plugin IME text back to the renderer. |
| 265 void PluginImeCompositionConfirmed(const string16& text, int plugin_id); | 265 void PluginImeCompositionConfirmed(const string16& text, int plugin_id); |
| 266 | 266 |
| 267 const std::string& selected_text() const { return selected_text_; } | 267 const std::string& selected_text() const { return selected_text_; } |
| 268 | 268 |
| 269 void UpdateRootGpuViewVisibility(bool show_gpu_widget); |
| 270 |
| 271 // When rendering transitions from gpu to software, the gpu widget can't be |
| 272 // hidden until the software backing store has been updated. This method |
| 273 // checks if the GPU view needs to be hidden and hides it if necessary. It |
| 274 // should be called after the software backing store has been painted to. |
| 275 void HandleDelayedGpuViewHiding(); |
| 276 |
| 269 // These member variables should be private, but the associated ObjC class | 277 // These member variables should be private, but the associated ObjC class |
| 270 // needs access to them and can't be made a friend. | 278 // needs access to them and can't be made a friend. |
| 271 | 279 |
| 272 // The associated Model. Can be NULL if Destroy() is called when | 280 // The associated Model. Can be NULL if Destroy() is called when |
| 273 // someone (other than superview) has retained |cocoa_view_|. | 281 // someone (other than superview) has retained |cocoa_view_|. |
| 274 RenderWidgetHost* render_widget_host_; | 282 RenderWidgetHost* render_widget_host_; |
| 275 | 283 |
| 276 // This is true when we are currently painting and thus should handle extra | 284 // This is true when we are currently painting and thus should handle extra |
| 277 // paint requests by expanding the invalid rect rather than actually painting. | 285 // paint requests by expanding the invalid rect rather than actually painting. |
| 278 bool about_to_validate_and_paint_; | 286 bool about_to_validate_and_paint_; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 342 |
| 335 // The text to be shown in the tooltip, supplied by the renderer. | 343 // The text to be shown in the tooltip, supplied by the renderer. |
| 336 std::wstring tooltip_text_; | 344 std::wstring tooltip_text_; |
| 337 | 345 |
| 338 // Factory used to safely scope delayed calls to ShutdownHost(). | 346 // Factory used to safely scope delayed calls to ShutdownHost(). |
| 339 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; | 347 ScopedRunnableMethodFactory<RenderWidgetHostViewMac> shutdown_factory_; |
| 340 | 348 |
| 341 // selected text on the renderer. | 349 // selected text on the renderer. |
| 342 std::string selected_text_; | 350 std::string selected_text_; |
| 343 | 351 |
| 352 // When rendering transitions from gpu to software, the gpu widget can't be |
| 353 // hidden until the software backing store has been updated. This variable is |
| 354 // set when the gpu widget needs to be hidden once a paint is completed. |
| 355 bool needs_gpu_visibility_update_after_repaint_; |
| 356 |
| 344 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 357 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 345 }; | 358 }; |
| 346 | 359 |
| 347 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 360 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |