| 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.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 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderli
ne.h" |
| 20 #include "ui/base/cocoa/base_view.h" | 20 #include "ui/base/cocoa/base_view.h" |
| 21 #include "webkit/glue/webcursor.h" | 21 #include "webkit/glue/webcursor.h" |
| 22 | 22 |
| 23 @class AcceleratedPluginView; | 23 @class AcceleratedPluginView; |
| 24 class RenderWidgetHostViewMac; | 24 class RenderWidgetHostViewMac; |
| 25 @protocol RenderWidgetHostViewMacDelegate; | 25 @protocol RenderWidgetHostViewMacDelegate; |
| 26 class RenderWidgetHostViewMacEditCommandHelper; | 26 class RenderWidgetHostViewMacEditCommandHelper; |
| 27 @class ToolTip; | 27 @class ToolTip; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 virtual void SetShowingContextMenu(bool showing) OVERRIDE; | 182 virtual void SetShowingContextMenu(bool showing) OVERRIDE; |
| 183 virtual void SetActive(bool active) OVERRIDE; | 183 virtual void SetActive(bool active) OVERRIDE; |
| 184 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; | 184 virtual void SetTakesFocusOnlyOnMouseDown(bool flag) OVERRIDE; |
| 185 virtual void SetWindowVisibility(bool visible) OVERRIDE; | 185 virtual void SetWindowVisibility(bool visible) OVERRIDE; |
| 186 virtual void WindowFrameChanged() OVERRIDE; | 186 virtual void WindowFrameChanged() OVERRIDE; |
| 187 virtual void UnhandledWheelEvent( | 187 virtual void UnhandledWheelEvent( |
| 188 const WebKit::WebMouseWheelEvent& event) OVERRIDE; | 188 const WebKit::WebMouseWheelEvent& event) OVERRIDE; |
| 189 virtual void SetBackground(const SkBitmap& background) OVERRIDE; | 189 virtual void SetBackground(const SkBitmap& background) OVERRIDE; |
| 190 | 190 |
| 191 // Implementation of RenderWidgetHostViewPort. | 191 // Implementation of RenderWidgetHostViewPort. |
| 192 virtual void InitAsPopup(RenderWidgetHostView* parent_host_view, | 192 virtual void InitAsPopup(content::RenderWidgetHostView* parent_host_view, |
| 193 const gfx::Rect& pos) OVERRIDE; | 193 const gfx::Rect& pos) OVERRIDE; |
| 194 virtual void InitAsFullscreen( | 194 virtual void InitAsFullscreen( |
| 195 RenderWidgetHostView* reference_host_view) OVERRIDE; | 195 content::RenderWidgetHostView* reference_host_view) OVERRIDE; |
| 196 virtual void DidBecomeSelected() OVERRIDE; | 196 virtual void DidBecomeSelected() OVERRIDE; |
| 197 virtual void WasHidden() OVERRIDE; | 197 virtual void WasHidden() OVERRIDE; |
| 198 virtual void MovePluginWindows( | 198 virtual void MovePluginWindows( |
| 199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; | 199 const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE; |
| 200 virtual void Focus() OVERRIDE; | 200 virtual void Focus() OVERRIDE; |
| 201 virtual void Blur() OVERRIDE; | 201 virtual void Blur() OVERRIDE; |
| 202 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; | 202 virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE; |
| 203 virtual void SetIsLoading(bool is_loading) OVERRIDE; | 203 virtual void SetIsLoading(bool is_loading) OVERRIDE; |
| 204 virtual void TextInputStateChanged(ui::TextInputType state, | 204 virtual void TextInputStateChanged(ui::TextInputType state, |
| 205 bool can_compose_inline) OVERRIDE; | 205 bool can_compose_inline) OVERRIDE; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 ui::TextInputType text_input_type_; | 339 ui::TextInputType text_input_type_; |
| 340 | 340 |
| 341 typedef std::map<gfx::PluginWindowHandle, AcceleratedPluginView*> | 341 typedef std::map<gfx::PluginWindowHandle, AcceleratedPluginView*> |
| 342 PluginViewMap; | 342 PluginViewMap; |
| 343 PluginViewMap plugin_views_; // Weak values. | 343 PluginViewMap plugin_views_; // Weak values. |
| 344 | 344 |
| 345 // Helper class for managing instances of accelerated plug-ins. | 345 // Helper class for managing instances of accelerated plug-ins. |
| 346 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; | 346 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; |
| 347 | 347 |
| 348 private: | 348 private: |
| 349 friend class RenderWidgetHostView; | 349 friend class content::RenderWidgetHostView; |
| 350 | 350 |
| 351 // The view will associate itself with the given widget. The native view must | 351 // The view will associate itself with the given widget. The native view must |
| 352 // be hooked up immediately to the view hierarchy, or else when it is | 352 // be hooked up immediately to the view hierarchy, or else when it is |
| 353 // deleted it will delete this out from under the caller. | 353 // deleted it will delete this out from under the caller. |
| 354 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); | 354 explicit RenderWidgetHostViewMac(RenderWidgetHost* widget); |
| 355 | 355 |
| 356 // If the window is at the root of the plugin container hierachy, | 356 // If the window is at the root of the plugin container hierachy, |
| 357 // we need to update the geometry manually. | 357 // we need to update the geometry manually. |
| 358 void UpdatePluginGeometry(gfx::PluginWindowHandle window, | 358 void UpdatePluginGeometry(gfx::PluginWindowHandle window, |
| 359 int32 width, | 359 int32 width, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // hidden until the software backing store has been updated. This variable is | 397 // hidden until the software backing store has been updated. This variable is |
| 398 // set when the gpu widget needs to be hidden once a paint is completed. | 398 // set when the gpu widget needs to be hidden once a paint is completed. |
| 399 bool needs_gpu_visibility_update_after_repaint_; | 399 bool needs_gpu_visibility_update_after_repaint_; |
| 400 | 400 |
| 401 gfx::PluginWindowHandle compositing_surface_; | 401 gfx::PluginWindowHandle compositing_surface_; |
| 402 | 402 |
| 403 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); | 403 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); |
| 404 }; | 404 }; |
| 405 | 405 |
| 406 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ | 406 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ |
| OLD | NEW |