| 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 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 // That means that the video is either fullscreen or it is the content of | 830 // That means that the video is either fullscreen or it is the content of |
| 831 // a fullscreen page (in other words, a fullscreen video with custom | 831 // a fullscreen page (in other words, a fullscreen video with custom |
| 832 // controls). | 832 // controls). |
| 833 // |IsFullscreen| must return |true| when this method is called. | 833 // |IsFullscreen| must return |true| when this method is called. |
| 834 bool HasActiveEffectivelyFullscreenVideo() const; | 834 bool HasActiveEffectivelyFullscreenVideo() const; |
| 835 | 835 |
| 836 // Called by this WebContents's BrowserPluginGuest (if one exists) to indicate | 836 // Called by this WebContents's BrowserPluginGuest (if one exists) to indicate |
| 837 // that the guest will be destroyed. | 837 // that the guest will be destroyed. |
| 838 void BrowserPluginGuestWillDestroy(); | 838 void BrowserPluginGuestWillDestroy(); |
| 839 | 839 |
| 840 // When inner or outer WebContents are present, become the focused |
| 841 // WebContentsImpl. This will activate this content's main frame RenderWidget |
| 842 // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will |
| 843 // search this WebContentsImpl for a focused RenderWidgetHost. The previously |
| 844 // focused WebContentsImpl, if any, will have its RenderWidgetHosts |
| 845 // deactivated. |
| 846 void SetAsFocusedWebContentsIfNecessary(); |
| 847 |
| 840 #if defined(OS_ANDROID) | 848 #if defined(OS_ANDROID) |
| 841 // Called by FindRequestManager when all of the find match rects are in. | 849 // Called by FindRequestManager when all of the find match rects are in. |
| 842 void NotifyFindMatchRectsReply(int version, | 850 void NotifyFindMatchRectsReply(int version, |
| 843 const std::vector<gfx::RectF>& rects, | 851 const std::vector<gfx::RectF>& rects, |
| 844 const gfx::RectF& active_rect); | 852 const gfx::RectF& active_rect); |
| 845 #endif | 853 #endif |
| 846 | 854 |
| 847 private: | 855 private: |
| 848 friend class WebContentsObserver; | 856 friend class WebContentsObserver; |
| 849 friend class WebContents; // To implement factory methods. | 857 friend class WebContents; // To implement factory methods. |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 // When multiple WebContents are present within a tab or window, a single one | 1121 // When multiple WebContents are present within a tab or window, a single one |
| 1114 // is focused and will route keyboard events in most cases to a RenderWidget | 1122 // is focused and will route keyboard events in most cases to a RenderWidget |
| 1115 // contained within it. |GetFocusedWebContents()|'s main frame widget will | 1123 // contained within it. |GetFocusedWebContents()|'s main frame widget will |
| 1116 // receive page focus and blur events when the containing window changes focus | 1124 // receive page focus and blur events when the containing window changes focus |
| 1117 // state. | 1125 // state. |
| 1118 | 1126 |
| 1119 // Returns true if |this| is the focused WebContents or an ancestor of the | 1127 // Returns true if |this| is the focused WebContents or an ancestor of the |
| 1120 // focused WebContents. | 1128 // focused WebContents. |
| 1121 bool ContainsOrIsFocusedWebContents(); | 1129 bool ContainsOrIsFocusedWebContents(); |
| 1122 | 1130 |
| 1123 // When inner or outer WebContents are present, become the focused | |
| 1124 // WebContentsImpl. This will activate this content's main frame RenderWidget | |
| 1125 // and indirectly all its subframe widgets. GetFocusedRenderWidgetHost will | |
| 1126 // search this WebContentsImpl for a focused RenderWidgetHost. The previously | |
| 1127 // focused WebContentsImpl, if any, will have its RenderWidgetHosts | |
| 1128 // deactivated. | |
| 1129 void SetAsFocusedWebContentsIfNecessary(); | |
| 1130 | |
| 1131 // Returns the root of the WebContents tree. | 1131 // Returns the root of the WebContents tree. |
| 1132 WebContentsImpl* GetOutermostWebContents(); | 1132 WebContentsImpl* GetOutermostWebContents(); |
| 1133 | 1133 |
| 1134 // Navigation helpers -------------------------------------------------------- | 1134 // Navigation helpers -------------------------------------------------------- |
| 1135 // | 1135 // |
| 1136 // These functions are helpers for Navigate() and DidNavigate(). | 1136 // These functions are helpers for Navigate() and DidNavigate(). |
| 1137 | 1137 |
| 1138 // Handles post-navigation tasks in DidNavigate AFTER the entry has been | 1138 // Handles post-navigation tasks in DidNavigate AFTER the entry has been |
| 1139 // committed to the navigation controller. Note that the navigation entry is | 1139 // committed to the navigation controller. Note that the navigation entry is |
| 1140 // not provided since it may be invalid/changed after being committed. The | 1140 // not provided since it may be invalid/changed after being committed. The |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1592 // Adds/removes a callback called on creation of each new WebContents. | 1592 // Adds/removes a callback called on creation of each new WebContents. |
| 1593 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1593 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1594 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1594 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1595 | 1595 |
| 1596 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); | 1596 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); |
| 1597 }; | 1597 }; |
| 1598 | 1598 |
| 1599 } // namespace content | 1599 } // namespace content |
| 1600 | 1600 |
| 1601 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1601 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |