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

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

Issue 1170623003: Revert "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"
12 #include "base/logging.h" 11 #include "base/logging.h"
13 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
14 #include "base/process/process.h" 13 #include "base/process/process.h"
15 #include "base/profiler/scoped_tracker.h" 14 #include "base/profiler/scoped_tracker.h"
16 #include "base/single_thread_task_runner.h"
17 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
18 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
19 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
20 #include "base/strings/utf_string_conversions.h" 18 #include "base/strings/utf_string_conversions.h"
21 #include "base/thread_task_runner_handle.h"
22 #include "base/time/time.h" 19 #include "base/time/time.h"
23 #include "base/trace_event/trace_event.h" 20 #include "base/trace_event/trace_event.h"
24 #include "components/mime_util/mime_util.h" 21 #include "components/mime_util/mime_util.h"
25 #include "content/browser/accessibility/accessibility_mode_helper.h" 22 #include "content/browser/accessibility/accessibility_mode_helper.h"
26 #include "content/browser/accessibility/browser_accessibility_state_impl.h" 23 #include "content/browser/accessibility/browser_accessibility_state_impl.h"
27 #include "content/browser/bad_message.h" 24 #include "content/browser/bad_message.h"
28 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 25 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
29 #include "content/browser/browser_plugin/browser_plugin_guest.h" 26 #include "content/browser/browser_plugin/browser_plugin_guest.h"
30 #include "content/browser/child_process_security_policy_impl.h" 27 #include "content/browser/child_process_security_policy_impl.h"
31 #include "content/browser/dom_storage/dom_storage_context_wrapper.h" 28 #include "content/browser/dom_storage/dom_storage_context_wrapper.h"
(...skipping 3768 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 3797
3801 // Clean-up the states if needed. 3798 // Clean-up the states if needed.
3802 if (load_progress == 1.0) 3799 if (load_progress == 1.0)
3803 ResetLoadProgressState(); 3800 ResetLoadProgressState();
3804 return; 3801 return;
3805 } 3802 }
3806 3803
3807 if (loading_weak_factory_.HasWeakPtrs()) 3804 if (loading_weak_factory_.HasWeakPtrs())
3808 return; 3805 return;
3809 3806
3810 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( 3807 base::MessageLoop::current()->PostDelayedTask(
3811 FROM_HERE, base::Bind(&WebContentsImpl::SendChangeLoadProgress, 3808 FROM_HERE,
3812 loading_weak_factory_.GetWeakPtr()), 3809 base::Bind(&WebContentsImpl::SendChangeLoadProgress,
3810 loading_weak_factory_.GetWeakPtr()),
3813 min_delay); 3811 min_delay);
3814 } 3812 }
3815 3813
3816 void WebContentsImpl::DidCancelLoading() { 3814 void WebContentsImpl::DidCancelLoading() {
3817 controller_.DiscardNonCommittedEntries(); 3815 controller_.DiscardNonCommittedEntries();
3818 3816
3819 // Update the URL display. 3817 // Update the URL display.
3820 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL); 3818 NotifyNavigationStateChanged(INVALIDATE_TYPE_URL);
3821 } 3819 }
3822 3820
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4442 player_map->erase(it); 4440 player_map->erase(it);
4443 } 4441 }
4444 4442
4445 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4443 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4446 force_disable_overscroll_content_ = force_disable; 4444 force_disable_overscroll_content_ = force_disable;
4447 if (view_) 4445 if (view_)
4448 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4446 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4449 } 4447 }
4450 4448
4451 } // namespace content 4449 } // 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