Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 567 | 567 |
| 568 ChildThread::Shutdown(); | 568 ChildThread::Shutdown(); |
| 569 | 569 |
| 570 if (memory_observer_) { | 570 if (memory_observer_) { |
| 571 message_loop()->RemoveTaskObserver(memory_observer_.get()); | 571 message_loop()->RemoveTaskObserver(memory_observer_.get()); |
| 572 memory_observer_.reset(); | 572 memory_observer_.reset(); |
| 573 } | 573 } |
| 574 | 574 |
| 575 // Wait for all databases to be closed. | 575 // Wait for all databases to be closed. |
| 576 if (webkit_platform_support_) { | 576 if (webkit_platform_support_) { |
| 577 // WaitForAllDatabasesToClose might run a nested message loop. To avoid | |
| 578 // processing timer events while we're already in the process of shutting | |
| 579 // down blink, put a ScopePageLoadDeferrer on the stack. | |
| 580 WebView::willEnterModalLoop(); | |
|
michaeln
2014/07/22 20:21:47
lgtm (kinda)
| |
| 577 webkit_platform_support_->web_database_observer_impl()-> | 581 webkit_platform_support_->web_database_observer_impl()-> |
| 578 WaitForAllDatabasesToClose(); | 582 WaitForAllDatabasesToClose(); |
| 583 WebView::didExitModalLoop(); | |
| 579 } | 584 } |
| 580 | 585 |
| 581 // Shutdown in reverse of the initialization order. | 586 // Shutdown in reverse of the initialization order. |
| 582 if (devtools_agent_message_filter_.get()) { | 587 if (devtools_agent_message_filter_.get()) { |
| 583 RemoveFilter(devtools_agent_message_filter_.get()); | 588 RemoveFilter(devtools_agent_message_filter_.get()); |
| 584 devtools_agent_message_filter_ = NULL; | 589 devtools_agent_message_filter_ = NULL; |
| 585 } | 590 } |
| 586 | 591 |
| 587 RemoveFilter(audio_input_message_filter_.get()); | 592 RemoveFilter(audio_input_message_filter_.get()); |
| 588 audio_input_message_filter_ = NULL; | 593 audio_input_message_filter_ = NULL; |
| (...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1597 hidden_widget_count_--; | 1602 hidden_widget_count_--; |
| 1598 | 1603 |
| 1599 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { | 1604 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { |
| 1600 return; | 1605 return; |
| 1601 } | 1606 } |
| 1602 | 1607 |
| 1603 ScheduleIdleHandler(kLongIdleHandlerDelayMs); | 1608 ScheduleIdleHandler(kLongIdleHandlerDelayMs); |
| 1604 } | 1609 } |
| 1605 | 1610 |
| 1606 } // namespace content | 1611 } // namespace content |
| OLD | NEW |