| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/dom_distiller/core/dom_distiller_service.h" | 5 #include "components/dom_distiller/core/dom_distiller_service.h" |
| 6 | 6 |
| 7 #include "base/guid.h" | 7 #include "base/guid.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "components/dom_distiller/core/distilled_content_store.h" | 9 #include "components/dom_distiller/core/distilled_content_store.h" |
| 10 #include "components/dom_distiller/core/dom_distiller_store.h" | 10 #include "components/dom_distiller/core/dom_distiller_store.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 distiller_page_factory_(distiller_page_factory.Pass()) { | 46 distiller_page_factory_(distiller_page_factory.Pass()) { |
| 47 } | 47 } |
| 48 | 48 |
| 49 DomDistillerService::~DomDistillerService() { | 49 DomDistillerService::~DomDistillerService() { |
| 50 } | 50 } |
| 51 | 51 |
| 52 syncer::SyncableService* DomDistillerService::GetSyncableService() const { | 52 syncer::SyncableService* DomDistillerService::GetSyncableService() const { |
| 53 return store_->GetSyncableService(); | 53 return store_->GetSyncableService(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 scoped_ptr<DistillerPage> DomDistillerService::CreateDefaultDistillerPage() { | 56 scoped_ptr<DistillerPage> DomDistillerService::CreateDefaultDistillerPage( |
| 57 return distiller_page_factory_->CreateDistillerPage().Pass(); | 57 const gfx::Size& render_view_size) { |
| 58 return distiller_page_factory_->CreateDistillerPage(render_view_size).Pass(); |
| 58 } | 59 } |
| 59 | 60 |
| 60 scoped_ptr<DistillerPage> | 61 scoped_ptr<DistillerPage> |
| 61 DomDistillerService::CreateDefaultDistillerPageWithHandle( | 62 DomDistillerService::CreateDefaultDistillerPageWithHandle( |
| 62 scoped_ptr<SourcePageHandle> handle) { | 63 scoped_ptr<SourcePageHandle> handle) { |
| 63 return distiller_page_factory_->CreateDistillerPageWithHandle(handle.Pass()) | 64 return distiller_page_factory_->CreateDistillerPageWithHandle(handle.Pass()) |
| 64 .Pass(); | 65 .Pass(); |
| 65 } | 66 } |
| 66 | 67 |
| 67 const std::string DomDistillerService::AddToList( | 68 const std::string DomDistillerService::AddToList( |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 DCHECK(observer); | 234 DCHECK(observer); |
| 234 store_->AddObserver(observer); | 235 store_->AddObserver(observer); |
| 235 } | 236 } |
| 236 | 237 |
| 237 void DomDistillerService::RemoveObserver(DomDistillerObserver* observer) { | 238 void DomDistillerService::RemoveObserver(DomDistillerObserver* observer) { |
| 238 DCHECK(observer); | 239 DCHECK(observer); |
| 239 store_->RemoveObserver(observer); | 240 store_->RemoveObserver(observer); |
| 240 } | 241 } |
| 241 | 242 |
| 242 } // namespace dom_distiller | 243 } // namespace dom_distiller |
| OLD | NEW |