Chromium Code Reviews| 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_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 647 // void Paste() override; | 647 // void Paste() override; |
| 648 // void SelectAll() override; | 648 // void SelectAll() override; |
| 649 void MoveRangeSelectionExtent(const gfx::Point& extent) override; | 649 void MoveRangeSelectionExtent(const gfx::Point& extent) override; |
| 650 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override; | 650 void SelectRange(const gfx::Point& base, const gfx::Point& extent) override; |
| 651 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust) | 651 void AdjustSelectionByCharacterOffset(int start_adjust, int end_adjust) |
| 652 override; | 652 override; |
| 653 RenderWidgetHostInputEventRouter* GetInputEventRouter() override; | 653 RenderWidgetHostInputEventRouter* GetInputEventRouter() override; |
| 654 void ReplicatePageFocus(bool is_focused) override; | 654 void ReplicatePageFocus(bool is_focused) override; |
| 655 RenderWidgetHostImpl* GetFocusedRenderWidgetHost( | 655 RenderWidgetHostImpl* GetFocusedRenderWidgetHost( |
| 656 RenderWidgetHostImpl* receiving_widget) override; | 656 RenderWidgetHostImpl* receiving_widget) override; |
| 657 void EnsureOwningContentsIsFocused( | |
| 658 RenderWidgetHostImpl* render_widget_host) override; | |
| 657 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, | 659 void RendererUnresponsive(RenderWidgetHostImpl* render_widget_host, |
| 658 RendererUnresponsiveType type) override; | 660 RendererUnresponsiveType type) override; |
| 659 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; | 661 void RendererResponsive(RenderWidgetHostImpl* render_widget_host) override; |
| 660 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, | 662 void RequestToLockMouse(RenderWidgetHostImpl* render_widget_host, |
| 661 bool user_gesture, | 663 bool user_gesture, |
| 662 bool last_unlocked_by_target, | 664 bool last_unlocked_by_target, |
| 663 bool privileged) override; | 665 bool privileged) override; |
| 664 bool IsFullscreenForCurrentTab() const override; | 666 bool IsFullscreenForCurrentTab() const override; |
| 665 blink::WebDisplayMode GetDisplayMode( | 667 blink::WebDisplayMode GetDisplayMode( |
| 666 RenderWidgetHostImpl* render_widget_host) const override; | 668 RenderWidgetHostImpl* render_widget_host) const override; |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1010 | 1012 |
| 1011 // Returns the focused WebContents. | 1013 // Returns the focused WebContents. |
| 1012 // If there are multiple inner/outer WebContents (when embedding <webview>, | 1014 // If there are multiple inner/outer WebContents (when embedding <webview>, |
| 1013 // <guestview>, ...) returns the single one containing the currently focused | 1015 // <guestview>, ...) returns the single one containing the currently focused |
| 1014 // frame. Otherwise, returns this WebContents. | 1016 // frame. Otherwise, returns this WebContents. |
| 1015 WebContentsImpl* GetFocusedWebContents(); | 1017 WebContentsImpl* GetFocusedWebContents(); |
| 1016 | 1018 |
| 1017 // Returns the root of the WebContents tree. | 1019 // Returns the root of the WebContents tree. |
| 1018 WebContentsImpl* GetOutermostWebContents(); | 1020 WebContentsImpl* GetOutermostWebContents(); |
| 1019 | 1021 |
| 1022 // Become the focused WebContentsImpl. This will activate this content's | |
| 1023 // RenderWidget and direct keyboard input to it. | |
|
alexmos
2016/10/28 06:36:39
I'd also mention what happens to |old_contents|.
avallee
2016/10/28 19:19:57
Done.
| |
| 1024 void ChangeFocus(WebContentsImpl* old_contents); | |
| 1025 | |
| 1020 // Navigation helpers -------------------------------------------------------- | 1026 // Navigation helpers -------------------------------------------------------- |
| 1021 // | 1027 // |
| 1022 // These functions are helpers for Navigate() and DidNavigate(). | 1028 // These functions are helpers for Navigate() and DidNavigate(). |
| 1023 | 1029 |
| 1024 // Handles post-navigation tasks in DidNavigate AFTER the entry has been | 1030 // Handles post-navigation tasks in DidNavigate AFTER the entry has been |
| 1025 // committed to the navigation controller. Note that the navigation entry is | 1031 // committed to the navigation controller. Note that the navigation entry is |
| 1026 // not provided since it may be invalid/changed after being committed. The | 1032 // not provided since it may be invalid/changed after being committed. The |
| 1027 // current navigation entry is in the NavigationController at this point. | 1033 // current navigation entry is in the NavigationController at this point. |
| 1028 | 1034 |
| 1029 // Helper for CreateNewWidget/CreateNewFullscreenWidget. | 1035 // Helper for CreateNewWidget/CreateNewFullscreenWidget. |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1461 // Adds/removes a callback called on creation of each new WebContents. | 1467 // Adds/removes a callback called on creation of each new WebContents. |
| 1462 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1468 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1463 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1469 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1464 | 1470 |
| 1465 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1471 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1466 }; | 1472 }; |
| 1467 | 1473 |
| 1468 } // namespace content | 1474 } // namespace content |
| 1469 | 1475 |
| 1470 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1476 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |