| OLD | NEW |
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "base/memory/scoped_nsobject.h" | 11 #include "base/memory/scoped_nsobject.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" | 15 #include "content/browser/accessibility/browser_accessibility_delegate_mac.h" |
| 16 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma
c.h" | 16 #include "content/browser/renderer_host/accelerated_surface_container_manager_ma
c.h" |
| 17 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 17 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 18 #include "content/common/edit_command.h" | 18 #include "content/common/edit_command.h" |
| 19 #import "content/public/browser/render_widget_host_view_mac_base.h" | 19 #import "content/public/browser/render_widget_host_view_mac_base.h" |
| 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 21 #include "ui/base/cocoa/base_view.h" | 21 #include "ui/base/cocoa/base_view.h" |
| 22 #include "webkit/glue/webcursor.h" | 22 #include "webkit/glue/webcursor.h" |
| 23 | 23 |
| 24 @class AcceleratedPluginView; | 24 @class AcceleratedPluginView; |
| 25 @class FullscreenWindowManager; |
| 25 class RenderWidgetHostViewMac; | 26 class RenderWidgetHostViewMac; |
| 26 @protocol RenderWidgetHostViewMacDelegate; | 27 @protocol RenderWidgetHostViewMacDelegate; |
| 27 class RenderWidgetHostViewMacEditCommandHelper; | 28 class RenderWidgetHostViewMacEditCommandHelper; |
| 28 @class ToolTip; | 29 @class ToolTip; |
| 29 | 30 |
| 30 namespace content { | 31 namespace content { |
| 31 class RenderWidgetHostImpl; | 32 class RenderWidgetHostImpl; |
| 32 } | 33 } |
| 33 | 34 |
| 34 @protocol RenderWidgetHostViewMacOwner | 35 @protocol RenderWidgetHostViewMacOwner |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 ui::TextInputType text_input_type_; | 352 ui::TextInputType text_input_type_; |
| 352 bool can_compose_inline_; | 353 bool can_compose_inline_; |
| 353 | 354 |
| 354 typedef std::map<gfx::PluginWindowHandle, AcceleratedPluginView*> | 355 typedef std::map<gfx::PluginWindowHandle, AcceleratedPluginView*> |
| 355 PluginViewMap; | 356 PluginViewMap; |
| 356 PluginViewMap plugin_views_; // Weak values. | 357 PluginViewMap plugin_views_; // Weak values. |
| 357 | 358 |
| 358 // Helper class for managing instances of accelerated plug-ins. | 359 // Helper class for managing instances of accelerated plug-ins. |
| 359 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; | 360 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; |
| 360 | 361 |
| 362 NSWindow* pepper_fullscreen_window() const { |
| 363 return pepper_fullscreen_window_; |
| 364 } |
| 365 |
| 361 private: | 366 private: |
| 362 friend class content::RenderWidgetHostView; | 367 friend class content::RenderWidgetHostView; |
| 363 | 368 |
| 364 // The view will associate itself with the given widget. The native view must | 369 // The view will associate itself with the given widget. The native view must |
| 365 // be hooked up immediately to the view hierarchy, or else when it is | 370 // be hooked up immediately to the view hierarchy, or else when it is |
| 366 // deleted it will delete this out from under the caller. | 371 // deleted it will delete this out from under the caller. |
| 367 explicit RenderWidgetHostViewMac(content::RenderWidgetHost* widget); | 372 explicit RenderWidgetHostViewMac(content::RenderWidgetHost* widget); |
| 368 | 373 |
| 369 // If the window is at the root of the plugin container hierachy, | 374 // If the window is at the root of the plugin container hierachy, |
| 370 // we need to update the geometry manually. | 375 // we need to update the geometry manually. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 | 411 |
| 407 bool accelerated_compositing_active_; | 412 bool accelerated_compositing_active_; |
| 408 | 413 |
| 409 // When rendering transitions from gpu to software, the gpu widget can't be | 414 // When rendering transitions from gpu to software, the gpu widget can't be |
| 410 // hidden until the software backing store has been updated. This variable is | 415 // hidden until the software backing store has been updated. This variable is |
| 411 // set when the gpu widget needs to be hidden once a paint is completed. | 416 // set when the gpu widget needs to be hidden once a paint is completed. |
| 412 bool needs_gpu_visibility_update_after_repaint_; | 417 bool needs_gpu_visibility_update_after_repaint_; |
| 413 | 418 |
| 414 gfx::PluginWindowHandle compositing_surface_; | 419 gfx::PluginWindowHandle compositing_surface_; |
| 415 | 420 |
| 421 // The fullscreen window used for pepper flash. |
| 422 scoped_nsobject<NSWindow> pepper_fullscreen_window_; |
| 423 scoped_nsobject<FullscreenWindowManager> fullscreen_window_manager_; |
| 424 |
| 416 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 425 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 417 }; | 426 }; |
| 418 | 427 |
| 419 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 428 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |