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

Unified Diff: ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.mm

Issue 2589583003: Upstream Chrome on iOS source code [7/11]. (Closed)
Patch Set: 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
Index: ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.mm
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.mm b/ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.mm
new file mode 100644
index 0000000000000000000000000000000000000000..d626bb313f0f4f0148286b6723050a585df8976b
--- /dev/null
+++ b/ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.mm
@@ -0,0 +1,39 @@
+// 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.
+
+#import "ios/chrome/browser/ui/reading_list/reading_list_view_controller_builder.h"
+
+#include "components/prefs/pref_service.h"
+#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
+#include "ios/chrome/browser/favicon/ios_chrome_large_icon_service_factory.h"
+#include "ios/chrome/browser/pref_names.h"
+#include "ios/chrome/browser/reading_list/reading_list_download_service.h"
+#include "ios/chrome/browser/reading_list/reading_list_download_service_factory.h"
+#include "ios/chrome/browser/reading_list/reading_list_model_factory.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+@implementation ReadingListViewControllerBuilder
+
++ (ReadingListViewController*)
+readingListViewControllerInBrowserState:(ios::ChromeBrowserState*)browserState
+ tabModel:(TabModel*)tabModel {
+ ReadingListModel* model =
+ ReadingListModelFactory::GetInstance()->GetForBrowserState(browserState);
+ favicon::LargeIconService* service =
+ IOSChromeLargeIconServiceFactory::GetForBrowserState(browserState);
+ ReadingListDownloadService* rlservice =
+ ReadingListDownloadServiceFactory::GetInstance()->GetForBrowserState(
+ browserState);
+ ReadingListViewController* vc =
+ [[ReadingListViewController alloc] initWithModel:model
+ tabModel:tabModel
+ largeIconService:service
+ readingListDownloadService:rlservice];
+ return vc;
+}
+
+@end

Powered by Google App Engine
This is Rietveld 408576698