distiller_page_factory_ios.mm 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2015 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/dom_distiller/ios/distiller_page_factory_ios.h"
  5. #include <memory>
  6. #include "components/dom_distiller/ios/distiller_page_ios.h"
  7. #include "ios/web/public/browser_state.h"
  8. #if !defined(__has_feature) || !__has_feature(objc_arc)
  9. #error "This file requires ARC support."
  10. #endif
  11. namespace dom_distiller {
  12. DistillerPageFactoryIOS::DistillerPageFactoryIOS(
  13. web::BrowserState* browser_state)
  14. : browser_state_(browser_state) {}
  15. DistillerPageFactoryIOS::~DistillerPageFactoryIOS() {}
  16. std::unique_ptr<DistillerPage> DistillerPageFactoryIOS::CreateDistillerPage(
  17. const gfx::Size& view_size) const {
  18. return std::make_unique<DistillerPageIOS>(browser_state_);
  19. }
  20. std::unique_ptr<DistillerPage>
  21. DistillerPageFactoryIOS::CreateDistillerPageWithHandle(
  22. std::unique_ptr<SourcePageHandle> handle) const {
  23. return std::make_unique<DistillerPageIOS>(browser_state_);
  24. }
  25. } // namespace dom_distiller