| 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_AURA_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 class InputMethod; | 70 class InputMethod; |
| 71 class LocatedEvent; | 71 class LocatedEvent; |
| 72 class Texture; | 72 class Texture; |
| 73 } | 73 } |
| 74 | 74 |
| 75 namespace content { | 75 namespace content { |
| 76 #if defined(OS_WIN) | 76 #if defined(OS_WIN) |
| 77 class LegacyRenderWidgetHostHWND; | 77 class LegacyRenderWidgetHostHWND; |
| 78 #endif | 78 #endif |
| 79 | 79 |
| 80 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 81 class KeybindingHandlerAuraX11; |
| 82 #endif |
| 83 |
| 80 class RenderWidgetHostImpl; | 84 class RenderWidgetHostImpl; |
| 81 class RenderWidgetHostView; | 85 class RenderWidgetHostView; |
| 82 class ResizeLock; | 86 class ResizeLock; |
| 83 | 87 |
| 84 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. | 88 // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. |
| 85 class CONTENT_EXPORT RenderWidgetHostViewAura | 89 class CONTENT_EXPORT RenderWidgetHostViewAura |
| 86 : public RenderWidgetHostViewBase, | 90 : public RenderWidgetHostViewBase, |
| 87 public ui::CompositorObserver, | 91 public ui::CompositorObserver, |
| 88 public ui::CompositorVSyncManager::Observer, | 92 public ui::CompositorVSyncManager::Observer, |
| 89 public ui::TextInputClient, | 93 public ui::TextInputClient, |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; | 419 virtual void AccessibilityDoDefaultAction(int acc_obj_id) OVERRIDE; |
| 416 virtual void AccessibilityScrollToMakeVisible( | 420 virtual void AccessibilityScrollToMakeVisible( |
| 417 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; | 421 int acc_obj_id, gfx::Rect subfocus) OVERRIDE; |
| 418 virtual void AccessibilityScrollToPoint( | 422 virtual void AccessibilityScrollToPoint( |
| 419 int acc_obj_id, gfx::Point point) OVERRIDE; | 423 int acc_obj_id, gfx::Point point) OVERRIDE; |
| 420 virtual void AccessibilitySetTextSelection( | 424 virtual void AccessibilitySetTextSelection( |
| 421 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; | 425 int acc_obj_id, int start_offset, int end_offset) OVERRIDE; |
| 422 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE; | 426 virtual gfx::Point GetLastTouchEventLocation() const OVERRIDE; |
| 423 virtual void FatalAccessibilityTreeError() OVERRIDE; | 427 virtual void FatalAccessibilityTreeError() OVERRIDE; |
| 424 | 428 |
| 429 void DoSharedInit(); |
| 430 |
| 425 void UpdateCursorIfOverSelf(); | 431 void UpdateCursorIfOverSelf(); |
| 426 bool ShouldSkipFrame(gfx::Size size_in_dip) const; | 432 bool ShouldSkipFrame(gfx::Size size_in_dip) const; |
| 427 | 433 |
| 428 // Set the bounds of the window and handle size changes. Assumes the caller | 434 // Set the bounds of the window and handle size changes. Assumes the caller |
| 429 // has already adjusted the origin of |rect| to conform to whatever coordinate | 435 // has already adjusted the origin of |rect| to conform to whatever coordinate |
| 430 // space is required by the aura::Window. | 436 // space is required by the aura::Window. |
| 431 void InternalSetBounds(const gfx::Rect& rect); | 437 void InternalSetBounds(const gfx::Rect& rect); |
| 432 | 438 |
| 433 // Lazily grab a resize lock if the aura window size doesn't match the current | 439 // Lazily grab a resize lock if the aura window size doesn't match the current |
| 434 // frame size, to give time to the renderer. | 440 // frame size, to give time to the renderer. |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 static void ReturnSubscriberTexture( | 517 static void ReturnSubscriberTexture( |
| 512 base::WeakPtr<RenderWidgetHostViewAura> rwhva, | 518 base::WeakPtr<RenderWidgetHostViewAura> rwhva, |
| 513 scoped_refptr<OwnedMailbox> subscriber_texture, | 519 scoped_refptr<OwnedMailbox> subscriber_texture, |
| 514 uint32 sync_point); | 520 uint32 sync_point); |
| 515 | 521 |
| 516 ui::Compositor* GetCompositor() const; | 522 ui::Compositor* GetCompositor() const; |
| 517 | 523 |
| 518 // Detaches |this| from the input method object. | 524 // Detaches |this| from the input method object. |
| 519 void DetachFromInputMethod(); | 525 void DetachFromInputMethod(); |
| 520 | 526 |
| 527 // Before calling RenderWidgetHost::ForwardKeyboardEvent(), this method |
| 528 // calls our keybindings handler against the event and send matched |
| 529 // edit commands to renderer instead. |
| 530 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& event); |
| 531 |
| 521 // Dismisses a Web Popup on a mouse or touch press outside the popup and its | 532 // Dismisses a Web Popup on a mouse or touch press outside the popup and its |
| 522 // parent. | 533 // parent. |
| 523 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); | 534 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); |
| 524 | 535 |
| 525 // Converts |rect| from window coordinate to screen coordinate. | 536 // Converts |rect| from window coordinate to screen coordinate. |
| 526 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; | 537 gfx::Rect ConvertRectToScreen(const gfx::Rect& rect) const; |
| 527 | 538 |
| 528 // Converts |rect| from screen coordinate to window coordinate. | 539 // Converts |rect| from screen coordinate to window coordinate. |
| 529 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; | 540 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; |
| 530 | 541 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 // The list of rectangles from constrained windows over this view. Windowed | 759 // The list of rectangles from constrained windows over this view. Windowed |
| 749 // NPAPI plugins shouldn't draw over them. | 760 // NPAPI plugins shouldn't draw over them. |
| 750 std::vector<gfx::Rect> constrained_rects_; | 761 std::vector<gfx::Rect> constrained_rects_; |
| 751 | 762 |
| 752 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; | 763 typedef std::map<HWND, WebPluginGeometry> PluginWindowMoves; |
| 753 // Contains information about each windowed plugin's clip and cutout rects ( | 764 // Contains information about each windowed plugin's clip and cutout rects ( |
| 754 // from the renderer). This is needed because when the transient windoiws | 765 // from the renderer). This is needed because when the transient windoiws |
| 755 // over this view changes, we need this information in order to create a new | 766 // over this view changes, we need this information in order to create a new |
| 756 // region for the HWND. | 767 // region for the HWND. |
| 757 PluginWindowMoves plugin_window_moves_; | 768 PluginWindowMoves plugin_window_moves_; |
| 769 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 770 // A convenience object for handling editor key bindings defined in gtk |
| 771 // keyboard theme. |
| 772 scoped_ptr<KeybindingHandlerAuraX11> key_bindings_handler_; |
| 758 #endif | 773 #endif |
| 759 | 774 |
| 760 base::TimeTicks last_draw_ended_; | 775 base::TimeTicks last_draw_ended_; |
| 761 | 776 |
| 762 // Subscriber that listens to frame presentation events. | 777 // Subscriber that listens to frame presentation events. |
| 763 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; | 778 scoped_ptr<RenderWidgetHostViewFrameSubscriber> frame_subscriber_; |
| 764 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_; | 779 std::vector<scoped_refptr<OwnedMailbox> > idle_frame_subscriber_textures_; |
| 765 std::set<OwnedMailbox*> active_frame_subscriber_textures_; | 780 std::set<OwnedMailbox*> active_frame_subscriber_textures_; |
| 766 | 781 |
| 767 // YUV readback pipeline. | 782 // YUV readback pipeline. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 792 // etc. | 807 // etc. |
| 793 scoped_ptr<content::LegacyRenderWidgetHostHWND> | 808 scoped_ptr<content::LegacyRenderWidgetHostHWND> |
| 794 legacy_render_widget_host_HWND_; | 809 legacy_render_widget_host_HWND_; |
| 795 #endif | 810 #endif |
| 796 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 811 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
| 797 }; | 812 }; |
| 798 | 813 |
| 799 } // namespace content | 814 } // namespace content |
| 800 | 815 |
| 801 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 816 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
| OLD | NEW |