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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 557 SessionStorageNamespace* GetSessionStorageNamespace( | 557 SessionStorageNamespace* GetSessionStorageNamespace( |
| 558 SiteInstance* instance) override; | 558 SiteInstance* instance) override; |
| 559 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; | 559 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; |
| 560 double GetPendingPageZoomLevel() override; | 560 double GetPendingPageZoomLevel() override; |
| 561 FrameTree* GetFrameTree() override; | 561 FrameTree* GetFrameTree() override; |
| 562 void SetIsVirtualKeyboardRequested(bool requested) override; | 562 void SetIsVirtualKeyboardRequested(bool requested) override; |
| 563 bool IsVirtualKeyboardRequested() override; | 563 bool IsVirtualKeyboardRequested() override; |
| 564 bool IsOverridingUserAgent() override; | 564 bool IsOverridingUserAgent() override; |
| 565 bool IsJavaScriptDialogShowing() const override; | 565 bool IsJavaScriptDialogShowing() const override; |
| 566 bool HideDownloadUI() const override; | 566 bool HideDownloadUI() const override; |
| 567 bool HasPersistentVideo() const override; | |
| 567 | 568 |
| 568 // NavigatorDelegate --------------------------------------------------------- | 569 // NavigatorDelegate --------------------------------------------------------- |
| 569 | 570 |
| 570 void DidStartNavigation(NavigationHandle* navigation_handle) override; | 571 void DidStartNavigation(NavigationHandle* navigation_handle) override; |
| 571 void DidRedirectNavigation(NavigationHandle* navigation_handle) override; | 572 void DidRedirectNavigation(NavigationHandle* navigation_handle) override; |
| 572 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; | 573 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; |
| 573 void DidFinishNavigation(NavigationHandle* navigation_handle) override; | 574 void DidFinishNavigation(NavigationHandle* navigation_handle) override; |
| 574 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, | 575 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, |
| 575 const GURL& validated_url, | 576 const GURL& validated_url, |
| 576 bool is_error_page) override; | 577 bool is_error_page) override; |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 786 void NotifyFindReply(int request_id, | 787 void NotifyFindReply(int request_id, |
| 787 int number_of_matches, | 788 int number_of_matches, |
| 788 const gfx::Rect& selection_rect, | 789 const gfx::Rect& selection_rect, |
| 789 int active_match_ordinal, | 790 int active_match_ordinal, |
| 790 bool final_update); | 791 bool final_update); |
| 791 | 792 |
| 792 // Modify the counter of connected devices for this WebContents. | 793 // Modify the counter of connected devices for this WebContents. |
| 793 void IncrementBluetoothConnectedDeviceCount(); | 794 void IncrementBluetoothConnectedDeviceCount(); |
| 794 void DecrementBluetoothConnectedDeviceCount(); | 795 void DecrementBluetoothConnectedDeviceCount(); |
| 795 | 796 |
| 797 // Called when the WebContents gains or loses a persistent video. | |
| 798 void SetHasPersistentVideo(bool value); | |
| 799 | |
| 796 #if defined(OS_ANDROID) | 800 #if defined(OS_ANDROID) |
| 797 // Called by FindRequestManager when all of the find match rects are in. | 801 // Called by FindRequestManager when all of the find match rects are in. |
| 798 void NotifyFindMatchRectsReply(int version, | 802 void NotifyFindMatchRectsReply(int version, |
| 799 const std::vector<gfx::RectF>& rects, | 803 const std::vector<gfx::RectF>& rects, |
| 800 const gfx::RectF& active_rect); | 804 const gfx::RectF& active_rect); |
| 801 #endif | 805 #endif |
| 802 | 806 |
| 803 private: | 807 private: |
| 804 friend class WebContentsObserver; | 808 friend class WebContentsObserver; |
| 805 friend class WebContents; // To implement factory methods. | 809 friend class WebContents; // To implement factory methods. |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1167 // Returns the FindRequestManager, or creates one if it doesn't already exist. | 1171 // Returns the FindRequestManager, or creates one if it doesn't already exist. |
| 1168 FindRequestManager* GetOrCreateFindRequestManager(); | 1172 FindRequestManager* GetOrCreateFindRequestManager(); |
| 1169 | 1173 |
| 1170 // Removes a registered WebContentsBindingSet by interface name. | 1174 // Removes a registered WebContentsBindingSet by interface name. |
| 1171 void RemoveBindingSet(const std::string& interface_name); | 1175 void RemoveBindingSet(const std::string& interface_name); |
| 1172 | 1176 |
| 1173 // Prints a console warning when visiting a localhost site with a bad | 1177 // Prints a console warning when visiting a localhost site with a bad |
| 1174 // certificate via --allow-insecure-localhost. | 1178 // certificate via --allow-insecure-localhost. |
| 1175 void ShowInsecureLocalhostWarningIfNeeded(); | 1179 void ShowInsecureLocalhostWarningIfNeeded(); |
| 1176 | 1180 |
| 1181 // Notify the RenderViewHost that the preferences have changed. This will send | |
|
nasko
2017/02/13 22:28:42
Let's avoid using RenderViewHost, as it is current
mlamouri (slow - plz ping)
2017/02/14 11:19:46
Done.
| |
| 1182 // an IPC to all the renderer process associated with this WebContents. | |
| 1183 void NotifyPreferencesChanged(); | |
| 1184 | |
| 1177 // Data for core operation --------------------------------------------------- | 1185 // Data for core operation --------------------------------------------------- |
| 1178 | 1186 |
| 1179 // Delegate for notifying our owner about stuff. Not owned by us. | 1187 // Delegate for notifying our owner about stuff. Not owned by us. |
| 1180 WebContentsDelegate* delegate_; | 1188 WebContentsDelegate* delegate_; |
| 1181 | 1189 |
| 1182 // Handles the back/forward list and loading. | 1190 // Handles the back/forward list and loading. |
| 1183 NavigationControllerImpl controller_; | 1191 NavigationControllerImpl controller_; |
| 1184 | 1192 |
| 1185 // The corresponding view. | 1193 // The corresponding view. |
| 1186 std::unique_ptr<WebContentsView> view_; | 1194 std::unique_ptr<WebContentsView> view_; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1493 | 1501 |
| 1494 #if defined(OS_ANDROID) | 1502 #if defined(OS_ANDROID) |
| 1495 std::unique_ptr<service_manager::InterfaceProvider> java_interfaces_; | 1503 std::unique_ptr<service_manager::InterfaceProvider> java_interfaces_; |
| 1496 #endif | 1504 #endif |
| 1497 | 1505 |
| 1498 // Whether this WebContents is for content overlay. | 1506 // Whether this WebContents is for content overlay. |
| 1499 bool is_overlay_content_; | 1507 bool is_overlay_content_; |
| 1500 | 1508 |
| 1501 int currently_playing_video_count_ = 0; | 1509 int currently_playing_video_count_ = 0; |
| 1502 | 1510 |
| 1511 bool has_persistent_video_ = false; | |
| 1512 | |
| 1503 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1513 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
| 1504 base::WeakPtrFactory<WebContentsImpl> weak_factory_; | 1514 base::WeakPtrFactory<WebContentsImpl> weak_factory_; |
| 1505 | 1515 |
| 1506 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1516 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 1507 }; | 1517 }; |
| 1508 | 1518 |
| 1509 // Dangerous methods which should never be made part of the public API, so we | 1519 // Dangerous methods which should never be made part of the public API, so we |
| 1510 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1520 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
| 1511 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1521 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
| 1512 private: | 1522 private: |
| 1513 friend class TestNavigationObserver; | 1523 friend class TestNavigationObserver; |
| 1514 friend class WebContentsAddedObserver; | 1524 friend class WebContentsAddedObserver; |
| 1515 friend class ContentBrowserSanityChecker; | 1525 friend class ContentBrowserSanityChecker; |
| 1516 | 1526 |
| 1517 FriendZone(); // Not instantiable. | 1527 FriendZone(); // Not instantiable. |
| 1518 | 1528 |
| 1519 // Adds/removes a callback called on creation of each new WebContents. | 1529 // Adds/removes a callback called on creation of each new WebContents. |
| 1520 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1530 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1521 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1531 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1522 | 1532 |
| 1523 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1533 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
| 1524 }; | 1534 }; |
| 1525 | 1535 |
| 1526 } // namespace content | 1536 } // namespace content |
| 1527 | 1537 |
| 1528 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1538 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |