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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 1159623009: content: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/location.h"
11 #include "base/logging.h" 12 #include "base/logging.h"
12 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
13 #include "base/process/process.h" 14 #include "base/process/process.h"
14 #include "base/profiler/scoped_tracker.h" 15 #include "base/profiler/scoped_tracker.h"
16 #include "base/single_thread_task_runner.h"
15 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
16 #include "base/strings/string_number_conversions.h" 18 #include "base/strings/string_number_conversions.h"
17 #include "base/strings/string_util.h" 19 #include "base/strings/string_util.h"
18 #include "base/strings/utf_string_conversions.h" 20 #include "base/strings/utf_string_conversions.h"
21 #include "base/thread_task_runner_handle.h"
19 #include "base/time/time.h" 22 #include "base/time/time.h"
20 #include "base/trace_event/trace_event.h" 23 #include "base/trace_event/trace_event.h"
21 #include "components/mime_util/mime_util.h" 24 #include "components/mime_util/mime_util.h"
22 #include "content/browser/accessibility/accessibility_mode_helper.h" 25 #include "content/browser/accessibility/accessibility_mode_helper.h"
23 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 26 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
24 #include "content/browser/bad_message.h" 27 #include "content/browser/bad_message.h"
25 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 28 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
26 #include "content/browser/browser_plugin/browser_plugin_guest.h" 29 #include "content/browser/browser_plugin/browser_plugin_guest.h"
27 #include "content/browser/child_process_security_policy_impl.h" 30 #include "content/browser/child_process_security_policy_impl.h"
28 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 31 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
(...skipping 3751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3780 3783
3781 // Clean-up the states if needed. 3784 // Clean-up the states if needed.
3782 if (load_progress == 1.0) 3785 if (load_progress == 1.0)
3783 ResetLoadProgressState(); 3786 ResetLoadProgressState();
3784 return; 3787 return;
3785 } 3788 }
3786 3789
3787 if (loading_weak_factory_.HasWeakPtrs()) 3790 if (loading_weak_factory_.HasWeakPtrs())
3788 return; 3791 return;
3789 3792
3790 base::MessageLoop::current()->PostDelayedTask( 3793 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
3791 FROM_HERE, 3794 FROM_HERE, base::Bind(&WebContentsImpl::SendChangeLoadProgress,
3792 base::Bind(&WebContentsImpl::SendChangeLoadProgress, 3795 loading_weak_factory_.GetWeakPtr()),
3793 loading_weak_factory_.GetWeakPtr()),
3794 min_delay); 3796 min_delay);
3795 } 3797 }
3796 3798
3797 void WebContentsImpl::DidCancelLoading() { 3799 void WebContentsImpl::DidCancelLoading() {
3798 controller_.DiscardNonCommittedEntries(); 3800 controller_.DiscardNonCommittedEntries();
3799 3801
3800 // Update the URL display. 3802 // Update the URL display.
3801 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 3803 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
3802 } 3804 }
3803 3805
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4423 player_map->erase(it); 4425 player_map->erase(it);
4424 } 4426 }
4425 4427
4426 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4428 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4427 force_disable_overscroll_content_ = force_disable; 4429 force_disable_overscroll_content_ = force_disable;
4428 if (view_) 4430 if (view_)
4429 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4431 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4430 } 4432 }
4431 4433
4432 } // namespace content 4434 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698