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

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: Test build fix. 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 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3797 3800
3798 // Clean-up the states if needed. 3801 // Clean-up the states if needed.
3799 if (load_progress == 1.0) 3802 if (load_progress == 1.0)
3800 ResetLoadProgressState(); 3803 ResetLoadProgressState();
3801 return; 3804 return;
3802 } 3805 }
3803 3806
3804 if (loading_weak_factory_.HasWeakPtrs()) 3807 if (loading_weak_factory_.HasWeakPtrs())
3805 return; 3808 return;
3806 3809
3807 base::MessageLoop::current()->PostDelayedTask( 3810 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
3808 FROM_HERE, 3811 FROM_HERE, base::Bind(&WebContentsImpl::SendChangeLoadProgress,
3809 base::Bind(&WebContentsImpl::SendChangeLoadProgress, 3812 loading_weak_factory_.GetWeakPtr()),
3810 loading_weak_factory_.GetWeakPtr()),
3811 min_delay); 3813 min_delay);
3812 } 3814 }
3813 3815
3814 void WebContentsImpl::DidCancelLoading() { 3816 void WebContentsImpl::DidCancelLoading() {
3815 controller_.DiscardNonCommittedEntries(); 3817 controller_.DiscardNonCommittedEntries();
3816 3818
3817 // Update the URL display. 3819 // Update the URL display.
3818 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 3820 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
3819 } 3821 }
3820 3822
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4440 player_map->erase(it); 4442 player_map->erase(it);
4441 } 4443 }
4442 4444
4443 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4445 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4444 force_disable_overscroll_content_ = force_disable; 4446 force_disable_overscroll_content_ = force_disable;
4445 if (view_) 4447 if (view_)
4446 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4448 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4447 } 4449 }
4448 4450
4449 } // namespace content 4451 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/streams/stream_url_request_job.cc ('k') | content/browser/web_contents/web_contents_view_aura_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698