| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |