Chromium Code Reviews| Index: ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm |
| diff --git a/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9acfa0d53460eab16bf4cb85bbca258cd8f2b2ca |
| --- /dev/null |
| +++ b/ios/chrome/browser/reading_list/reading_list_distiller_page_factory.mm |
| @@ -0,0 +1,34 @@ |
| +// 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 "ios/chrome/browser/reading_list/reading_list_distiller_page_factory.h" |
| + |
| +#include "base/memory/ptr_util.h" |
| +#include "components/reading_list/ios/favicon_web_state_dispatcher.h" |
| +#include "ios/chrome/browser/reading_list/reading_list_distiller_page.h" |
| +#include "ios/web/public/browser_state.h" |
| + |
| +namespace reading_list { |
| + |
| +ReadingListDistillerPageFactory::ReadingListDistillerPageFactory( |
| + std::unique_ptr<FaviconWebStateDispatcher> web_state_dispatcher) |
| + : web_state_dispatcher_(std::move(web_state_dispatcher)) {} |
| + |
| +ReadingListDistillerPageFactory::~ReadingListDistillerPageFactory() {} |
| + |
| +std::unique_ptr<dom_distiller::DistillerPage> |
| +ReadingListDistillerPageFactory::CreateDistillerPage( |
| + const gfx::Size& view_size) const { |
| + return base::MakeUnique<ReadingListDistillerPage>( |
| + web_state_dispatcher_.get()); |
| +} |
| + |
| +std::unique_ptr<dom_distiller::DistillerPage> |
| +ReadingListDistillerPageFactory::CreateDistillerPageWithHandle( |
| + std::unique_ptr<dom_distiller::SourcePageHandle> handle) const { |
| + return base::MakeUnique<ReadingListDistillerPage>( |
| + web_state_dispatcher_.get()); |
| +} |
| + |
| +} // namespace dom_distiller |
|
gambard
2016/12/27 09:35:59
Update namespace
Olivier
2016/12/27 10:08:37
Done.
|