| 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 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 // Called when the WebContents gains or loses a persistent video. | 805 // Called when the WebContents gains or loses a persistent video. |
| 806 void SetHasPersistentVideo(bool has_persistent_video); | 806 void SetHasPersistentVideo(bool has_persistent_video); |
| 807 | 807 |
| 808 // Whether the WebContents has an active player is effectively fullscreen. | 808 // Whether the WebContents has an active player is effectively fullscreen. |
| 809 // That means that the video is either fullscreen or it is the content of | 809 // That means that the video is either fullscreen or it is the content of |
| 810 // a fullscreen page (in other words, a fullscreen video with custom | 810 // a fullscreen page (in other words, a fullscreen video with custom |
| 811 // controls). | 811 // controls). |
| 812 // |IsFullscreen| must return |true| when this method is called. | 812 // |IsFullscreen| must return |true| when this method is called. |
| 813 bool HasActiveEffectivelyFullscreenVideo() const; | 813 bool HasActiveEffectivelyFullscreenVideo() const; |
| 814 | 814 |
| 815 // When inner or outer WebContents are present, become the focused |
| 816 // WebContentsImpl. This will activate this content's main frame RenderWidget |
| 817 // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will |
| 818 // search this WebContentsImpl for a focused RenderWidgetHost. The previously |
| 819 // focused WebContentsImpl, if any, will have its RenderWidgetHosts |
| 820 // deactivated. |
| 821 void SetAsFocusedWebContentsIfNecessary(); |
| 822 |
| 815 #if defined(OS_ANDROID) | 823 #if defined(OS_ANDROID) |
| 816 // Called by FindRequestManager when all of the find match rects are in. | 824 // Called by FindRequestManager when all of the find match rects are in. |
| 817 void NotifyFindMatchRectsReply(int version, | 825 void NotifyFindMatchRectsReply(int version, |
| 818 const std::vector<gfx::RectF>& rects, | 826 const std::vector<gfx::RectF>& rects, |
| 819 const gfx::RectF& active_rect); | 827 const gfx::RectF& active_rect); |
| 820 #endif | 828 #endif |
| 821 | 829 |
| 822 private: | 830 private: |
| 823 friend class WebContentsObserver; | 831 friend class WebContentsObserver; |
| 824 friend class WebContents; // To implement factory methods. | 832 friend class WebContents; // To implement factory methods. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 // Returns the focused WebContents. | 1090 // Returns the focused WebContents. |
| 1083 // If there are multiple inner/outer WebContents (when embedding <webview>, | 1091 // If there are multiple inner/outer WebContents (when embedding <webview>, |
| 1084 // <guestview>, ...) returns the single one containing the currently focused | 1092 // <guestview>, ...) returns the single one containing the currently focused |
| 1085 // frame. Otherwise, returns this WebContents. | 1093 // frame. Otherwise, returns this WebContents. |
| 1086 WebContentsImpl* GetFocusedWebContents(); | 1094 WebContentsImpl* GetFocusedWebContents(); |
| 1087 | 1095 |
| 1088 // Returns true if |this| is the focused WebContents or an ancestor of the | 1096 // Returns true if |this| is the focused WebContents or an ancestor of the |
| 1089 // focused WebContents. | 1097 // focused WebContents. |
| 1090 bool ContainsOrIsFocusedWebContents(); | 1098 bool ContainsOrIsFocusedWebContents(); |
| 1091 | 1099 |
| 1092 // When inner or outer WebContents are present, become the focused | |
| 1093 // WebContentsImpl. This will activate this content's main frame RenderWidget | |
| 1094 // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will | |
| 1095 // search this WebContentsImpl for a focused RenderWidgetHost. The previously | |
| 1096 // focused WebContentsImpl, if any, will have its RenderWidgetHosts | |
| 1097 // deactivated. | |
| 1098 void SetAsFocusedWebContentsIfNecessary(); | |
| 1099 | |
| 1100 // Returns the root of the WebContents tree. | 1100 // Returns the root of the WebContents tree. |
| 1101 WebContentsImpl* GetOutermostWebContents(); | 1101 WebContentsImpl* GetOutermostWebContents(); |
| 1102 | 1102 |
| 1103 // Navigation helpers -------------------------------------------------------- | 1103 // Navigation helpers -------------------------------------------------------- |
| 1104 // | 1104 // |
| 1105 // These functions are helpers for Navigate() and DidNavigate(). | 1105 // These functions are helpers for Navigate() and DidNavigate(). |
| 1106 | 1106 |
| 1107 // Handles post-navigation tasks in DidNavigate AFTER the entry has been | 1107 // Handles post-navigation tasks in DidNavigate AFTER the entry has been |
| 1108 // committed to the navigation controller. Note that the navigation entry is | 1108 // committed to the navigation controller. Note that the navigation entry is |
| 1109 // not provided since it may be invalid/changed after being committed. The | 1109 // not provided since it may be invalid/changed after being committed. The |
| (...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 // Adds/removes a callback called on creation of each new WebContents. | 1557 // Adds/removes a callback called on creation of each new WebContents. |
| 1558 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1558 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1559 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1559 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1560 | 1560 |
| 1561 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); | 1561 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); |
| 1562 }; | 1562 }; |
| 1563 | 1563 |
| 1564 } // namespace content | 1564 } // namespace content |
| 1565 | 1565 |
| 1566 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1566 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |