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

Side by Side Diff: ios/web/app/web_main_loop.mm

Issue 2647943004: Return unique_ptr from WebClient::CreateWebMainParts() (Closed)
Patch Set: Respond to comments. Created 3 years, 11 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
« no previous file with comments | « ios/chrome/browser/web/chrome_web_client.mm ('k') | ios/web/public/web_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ios/web/app/web_main_loop.h" 5 #include "ios/web/app/web_main_loop.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK(!g_current_web_main_loop); 96 DCHECK(!g_current_web_main_loop);
97 g_current_web_main_loop = this; 97 g_current_web_main_loop = this;
98 } 98 }
99 99
100 WebMainLoop::~WebMainLoop() { 100 WebMainLoop::~WebMainLoop() {
101 DCHECK_EQ(this, g_current_web_main_loop); 101 DCHECK_EQ(this, g_current_web_main_loop);
102 g_current_web_main_loop = nullptr; 102 g_current_web_main_loop = nullptr;
103 } 103 }
104 104
105 void WebMainLoop::Init() { 105 void WebMainLoop::Init() {
106 parts_.reset(web::GetWebClient()->CreateWebMainParts()); 106 parts_ = web::GetWebClient()->CreateWebMainParts();
107 } 107 }
108 108
109 void WebMainLoop::EarlyInitialization() { 109 void WebMainLoop::EarlyInitialization() {
110 if (parts_) { 110 if (parts_) {
111 parts_->PreEarlyInitialization(); 111 parts_->PreEarlyInitialization();
112 parts_->PostEarlyInitialization(); 112 parts_->PostEarlyInitialization();
113 } 113 }
114 } 114 }
115 115
116 void WebMainLoop::MainMessageLoopStart() { 116 void WebMainLoop::MainMessageLoopStart() {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 main_thread_.reset( 336 main_thread_.reset(
337 new WebThreadImpl(WebThread::UI, base::MessageLoop::current())); 337 new WebThreadImpl(WebThread::UI, base::MessageLoop::current()));
338 } 338 }
339 339
340 int WebMainLoop::WebThreadsStarted() { 340 int WebMainLoop::WebThreadsStarted() {
341 cookie_notification_bridge_.reset(new CookieNotificationBridge); 341 cookie_notification_bridge_.reset(new CookieNotificationBridge);
342 return result_code_; 342 return result_code_;
343 } 343 }
344 344
345 } // namespace web 345 } // namespace web
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/chrome_web_client.mm ('k') | ios/web/public/web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698