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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 bool GetSelectionRange(gfx::Range* range) const override; | 212 bool GetSelectionRange(gfx::Range* range) const override; |
213 bool SetSelectionRange(const gfx::Range& range) override; | 213 bool SetSelectionRange(const gfx::Range& range) override; |
214 bool DeleteRange(const gfx::Range& range) override; | 214 bool DeleteRange(const gfx::Range& range) override; |
215 bool GetTextFromRange(const gfx::Range& range, | 215 bool GetTextFromRange(const gfx::Range& range, |
216 base::string16* text) const override; | 216 base::string16* text) const override; |
217 void OnInputMethodChanged() override; | 217 void OnInputMethodChanged() override; |
218 bool ChangeTextDirectionAndLayoutAlignment( | 218 bool ChangeTextDirectionAndLayoutAlignment( |
219 base::i18n::TextDirection direction) override; | 219 base::i18n::TextDirection direction) override; |
220 void ExtendSelectionAndDelete(size_t before, size_t after) override; | 220 void ExtendSelectionAndDelete(size_t before, size_t after) override; |
221 void EnsureCaretNotInRect(const gfx::Rect& rect) override; | 221 void EnsureCaretNotInRect(const gfx::Rect& rect) override; |
| 222 void OnClientFocusLost() override; |
222 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override; | 223 bool IsTextEditCommandEnabled(ui::TextEditCommand command) const override; |
223 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override; | 224 void SetTextEditCommandForNextKeyEvent(ui::TextEditCommand command) override; |
224 | 225 |
225 // Overridden from display::DisplayObserver: | 226 // Overridden from display::DisplayObserver: |
226 void OnDisplayAdded(const display::Display& new_display) override; | 227 void OnDisplayAdded(const display::Display& new_display) override; |
227 void OnDisplayRemoved(const display::Display& old_display) override; | 228 void OnDisplayRemoved(const display::Display& old_display) override; |
228 void OnDisplayMetricsChanged(const display::Display& display, | 229 void OnDisplayMetricsChanged(const display::Display& display, |
229 uint32_t metrics) override; | 230 uint32_t metrics) override; |
230 | 231 |
231 // Overridden from aura::WindowDelegate: | 232 // Overridden from aura::WindowDelegate: |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 protected: | 322 protected: |
322 ~RenderWidgetHostViewAura() override; | 323 ~RenderWidgetHostViewAura() override; |
323 | 324 |
324 // Exposed for tests. | 325 // Exposed for tests. |
325 aura::Window* window() { return window_; } | 326 aura::Window* window() { return window_; } |
326 | 327 |
327 DelegatedFrameHost* GetDelegatedFrameHost() const { | 328 DelegatedFrameHost* GetDelegatedFrameHost() const { |
328 return delegated_frame_host_.get(); | 329 return delegated_frame_host_.get(); |
329 } | 330 } |
330 | 331 |
| 332 // Returns the top level window that is hosting the renderwidget. |
| 333 virtual aura::Window* GetToplevelWindow(); |
| 334 |
331 private: | 335 private: |
332 friend class DelegatedFrameHostClientAura; | 336 friend class DelegatedFrameHostClientAura; |
333 friend class InputMethodAuraTestBase; | 337 friend class InputMethodAuraTestBase; |
334 friend class RenderWidgetHostViewAuraTest; | 338 friend class RenderWidgetHostViewAuraTest; |
335 friend class RenderWidgetHostViewAuraCopyRequestTest; | 339 friend class RenderWidgetHostViewAuraCopyRequestTest; |
336 friend class TestInputMethodObserver; | 340 friend class TestInputMethodObserver; |
337 FRIEND_TEST_ALL_PREFIXES(InputMethodResultAuraTest, | 341 FRIEND_TEST_ALL_PREFIXES(InputMethodResultAuraTest, |
338 FinishImeCompositionSession); | 342 FinishImeCompositionSession); |
339 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, | 343 FRIEND_TEST_ALL_PREFIXES(RenderWidgetHostViewAuraTest, |
340 PopupRetainsCaptureAfterMouseRelease); | 344 PopupRetainsCaptureAfterMouseRelease); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override; | 435 const cc::BeginFrameArgs& LastUsedBeginFrameArgs() const override; |
432 void OnBeginFrameSourcePausedChanged(bool paused) override; | 436 void OnBeginFrameSourcePausedChanged(bool paused) override; |
433 | 437 |
434 // Detaches |this| from the input method object. | 438 // Detaches |this| from the input method object. |
435 void DetachFromInputMethod(); | 439 void DetachFromInputMethod(); |
436 | 440 |
437 // Dismisses a Web Popup on a mouse or touch press outside the popup and its | 441 // Dismisses a Web Popup on a mouse or touch press outside the popup and its |
438 // parent. | 442 // parent. |
439 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); | 443 void ApplyEventFilterForPopupExit(ui::LocatedEvent* event); |
440 | 444 |
441 // Converts |rect| from screen coordinate to window coordinate. | |
442 gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const; | |
443 | |
444 // Called when the parent window bounds change. | 445 // Called when the parent window bounds change. |
445 void HandleParentBoundsChanged(); | 446 void HandleParentBoundsChanged(); |
446 | 447 |
447 // Called when the parent window hierarchy for our window changes. | 448 // Called when the parent window hierarchy for our window changes. |
448 void ParentHierarchyChanged(); | 449 void ParentHierarchyChanged(); |
449 | 450 |
450 // Helper function to create a selection controller. | 451 // Helper function to create a selection controller. |
451 void CreateSelectionController(); | 452 void CreateSelectionController(); |
452 | 453 |
453 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| | 454 // Used to set the |popup_child_host_view_| on the |popup_parent_host_view_| |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; | 583 std::unique_ptr<RenderWidgetHostViewEventHandler> event_handler_; |
583 | 584 |
584 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; | 585 base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_; |
585 | 586 |
586 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); | 587 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewAura); |
587 }; | 588 }; |
588 | 589 |
589 } // namespace content | 590 } // namespace content |
590 | 591 |
591 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ | 592 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_AURA_H_ |
OLD | NEW |