Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Unified Diff: components/offline_pages/content/background_loader/background_loader_contents_stub.cc

Issue 2534673002: [Offline pages] Create offliner that uses background loader (Closed)
Patch Set: bleh it works now Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/offline_pages/content/background_loader/background_loader_contents_stub.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/content/background_loader/background_loader_contents_stub.cc
diff --git a/components/offline_pages/content/background_loader/background_loader_contents_stub.cc b/components/offline_pages/content/background_loader/background_loader_contents_stub.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2acbe965c41e3a0b37de6bfbbe1cac01bfb9a4a9
--- /dev/null
+++ b/components/offline_pages/content/background_loader/background_loader_contents_stub.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/offline_pages/content/background_loader/background_loader_contents_stub.h"
+
+#include "base/logging.h"
+#include "content/public/browser/web_contents.h"
+#include "content/public/test/web_contents_tester.h"
+
+namespace background_loader {
+
+BackgroundLoaderContentsStub::BackgroundLoaderContentsStub(
+ content::BrowserContext* browser_context)
+ : BackgroundLoaderContents(), is_loading_(false) {
+ BackgroundLoaderContents::web_contents_.reset(
+ content::WebContentsTester::CreateTestWebContents(browser_context, NULL));
+ web_contents_.get()->SetDelegate(this);
+}
+
+BackgroundLoaderContentsStub::~BackgroundLoaderContentsStub() {}
+
+void BackgroundLoaderContentsStub::LoadPage(const GURL& url) {
+ is_loading_ = true;
+}
+
+} // namespace background_loader
« no previous file with comments | « components/offline_pages/content/background_loader/background_loader_contents_stub.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698