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

Side by Side Diff: ios/web_view/internal/criwv_web_main_parts.mm

Issue 2692603002: Convert //ios/web_view/internal to ARC. (Closed)
Patch Set: Respond to comments. Created 3 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import "ios/web_view/internal/criwv_web_main_parts.h" 5 #import "ios/web_view/internal/criwv_web_main_parts.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "components/translate/core/browser/translate_download_manager.h" 10 #include "components/translate/core/browser/translate_download_manager.h"
11 #include "ios/web_view/internal/criwv_browser_state.h" 11 #include "ios/web_view/internal/criwv_browser_state.h"
12 #import "ios/web_view/public/criwv_delegate.h" 12 #import "ios/web_view/public/criwv_delegate.h"
13 #include "ui/base/l10n/l10n_util_mac.h" 13 #include "ui/base/l10n/l10n_util_mac.h"
14 #include "ui/base/resource/resource_bundle.h" 14 #include "ui/base/resource/resource_bundle.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 namespace ios_web_view { 20 namespace ios_web_view {
17 21
18 CRIWVWebMainParts::CRIWVWebMainParts(id<CRIWVDelegate> delegate) { 22 CRIWVWebMainParts::CRIWVWebMainParts(id<CRIWVDelegate> delegate) {
19 delegate_ = delegate; 23 delegate_ = delegate;
20 } 24 }
21 25
22 CRIWVWebMainParts::~CRIWVWebMainParts() {} 26 CRIWVWebMainParts::~CRIWVWebMainParts() {}
23 27
24 void CRIWVWebMainParts::PreMainMessageLoopRun() { 28 void CRIWVWebMainParts::PreMainMessageLoopRun() {
25 // Initialize resources. 29 // Initialize resources.
(...skipping 13 matching lines...) Expand all
39 translate::TranslateDownloadManager* download_manager = 43 translate::TranslateDownloadManager* download_manager =
40 translate::TranslateDownloadManager::GetInstance(); 44 translate::TranslateDownloadManager::GetInstance();
41 // TODO(crbug.com/679895): See if we need the system request context here. 45 // TODO(crbug.com/679895): See if we need the system request context here.
42 download_manager->set_request_context(browser_state_->GetRequestContext()); 46 download_manager->set_request_context(browser_state_->GetRequestContext());
43 // TODO(crbug.com/679895): Bring up application locale correctly. 47 // TODO(crbug.com/679895): Bring up application locale correctly.
44 download_manager->set_application_locale(l10n_util::GetLocaleOverride()); 48 download_manager->set_application_locale(l10n_util::GetLocaleOverride());
45 download_manager->language_list()->SetResourceRequestsAllowed(true); 49 download_manager->language_list()->SetResourceRequestsAllowed(true);
46 } 50 }
47 51
48 } // namespace ios_web_view 52 } // namespace ios_web_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698