Commit a911482f authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Move WebContents internals to use the new callbacks.

BUG=714018

Change-Id: I7adfe8e440d29b4f775535a9942e2354d076a9d3
Reviewed-on: https://chromium-review.googlesource.com/976656Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545525}
parent abb7a387
...@@ -177,8 +177,9 @@ const char kDotGoogleDotCom[] = ".google.com"; ...@@ -177,8 +177,9 @@ const char kDotGoogleDotCom[] = ".google.com";
const void* const kWebContentsAndroidKey = &kWebContentsAndroidKey; const void* const kWebContentsAndroidKey = &kWebContentsAndroidKey;
#endif #endif
base::LazyInstance<std::vector<WebContentsImpl::CreatedCallback>>:: base::LazyInstance<std::vector<
DestructorAtExit g_created_callbacks = LAZY_INSTANCE_INITIALIZER; WebContentsImpl::FriendWrapper::CreatedCallback>>::DestructorAtExit
g_created_callbacks = LAZY_INSTANCE_INITIALIZER;
void NotifyCacheOnIO( void NotifyCacheOnIO(
scoped_refptr<net::URLRequestContextGetter> request_context, scoped_refptr<net::URLRequestContextGetter> request_context,
......
...@@ -846,8 +846,6 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, ...@@ -846,8 +846,6 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// Unpause the throbber if it was paused. // Unpause the throbber if it was paused.
void DidProceedOnInterstitial() override; void DidProceedOnInterstitial() override;
typedef base::Callback<void(WebContents*)> CreatedCallback;
// Forces overscroll to be disabled (used by touch emulation). // Forces overscroll to be disabled (used by touch emulation).
void SetForceDisableOverscrollContent(bool force_disable); void SetForceDisableOverscrollContent(bool force_disable);
...@@ -1712,6 +1710,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, ...@@ -1712,6 +1710,9 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
// Dangerous methods which should never be made part of the public API, so we // Dangerous methods which should never be made part of the public API, so we
// grant their use only to an explicit friend list (c++ attorney/client idiom). // grant their use only to an explicit friend list (c++ attorney/client idiom).
class CONTENT_EXPORT WebContentsImpl::FriendWrapper { class CONTENT_EXPORT WebContentsImpl::FriendWrapper {
public:
using CreatedCallback = base::RepeatingCallback<void(WebContents*)>;
private: private:
friend class TestNavigationObserver; friend class TestNavigationObserver;
friend class WebContentsAddedObserver; friend class WebContentsAddedObserver;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment