summaryrefslogtreecommitdiffstats
path: root/content/browser/web_contents
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/web_contents')
-rw-r--r--content/browser/web_contents/interstitial_page_impl.cc3
-rw-r--r--content/browser/web_contents/navigation_controller_impl_unittest.cc4
-rw-r--r--content/browser/web_contents/render_view_host_manager_unittest.cc8
-rw-r--r--content/browser/web_contents/web_contents_drag_win.cc5
-rw-r--r--content/browser/web_contents/web_contents_view_aura.cc23
-rw-r--r--content/browser/web_contents/web_contents_view_mac.mm3
-rw-r--r--content/browser/web_contents/web_drag_dest_gtk.cc3
-rw-r--r--content/browser/web_contents/web_drag_source_gtk.cc6
-rw-r--r--content/browser/web_contents/web_drag_source_gtk.h3
9 files changed, 34 insertions, 24 deletions
diff --git a/content/browser/web_contents/interstitial_page_impl.cc b/content/browser/web_contents/interstitial_page_impl.cc
index 33743c6..9673e98 100644
--- a/content/browser/web_contents/interstitial_page_impl.cc
+++ b/content/browser/web_contents/interstitial_page_impl.cc
@@ -268,7 +268,8 @@ void InterstitialPageImpl::Hide() {
// Shutdown the RVH asynchronously, as we may have been called from a RVH
// delegate method, and we can't delete the RVH out from under itself.
- MessageLoop::current()->PostNonNestableTask(FROM_HERE,
+ base::MessageLoop::current()->PostNonNestableTask(
+ FROM_HERE,
base::Bind(&InterstitialPageImpl::Shutdown,
weak_ptr_factory_.GetWeakPtr(),
render_view_host_));
diff --git a/content/browser/web_contents/navigation_controller_impl_unittest.cc b/content/browser/web_contents/navigation_controller_impl_unittest.cc
index 1442be1..4a51897e 100644
--- a/content/browser/web_contents/navigation_controller_impl_unittest.cc
+++ b/content/browser/web_contents/navigation_controller_impl_unittest.cc
@@ -3422,8 +3422,8 @@ class NavigationControllerHistoryTest : public NavigationControllerTest {
HistoryService* history = HistoryServiceFactory::GetForProfiles(
profile(), Profile::IMPLICIT_ACCESS);
if (history) {
- history->SetOnBackendDestroyTask(MessageLoop::QuitClosure());
- MessageLoop::current()->Run();
+ history->SetOnBackendDestroyTask(base::MessageLoop::QuitClosure());
+ base::MessageLoop::current()->Run();
}
// Do normal cleanup before deleting the profile directory below.
diff --git a/content/browser/web_contents/render_view_host_manager_unittest.cc b/content/browser/web_contents/render_view_host_manager_unittest.cc
index 2639e8d..c4fd94a 100644
--- a/content/browser/web_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/web_contents/render_view_host_manager_unittest.cc
@@ -130,7 +130,7 @@ class RenderViewHostManagerTest
// a regression test for bug 9364.
TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
set_should_create_webui(true);
- BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
+ BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current());
const GURL kChromeUrl("chrome://foo");
const GURL kDestUrl("http://www.google.com/");
@@ -195,7 +195,7 @@ TEST_F(RenderViewHostManagerTest, NewTabPageProcesses) {
// for synchronous messages, which cannot be ignored without leaving the
// renderer in a stuck state. See http://crbug.com/93427.
TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) {
- BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
+ BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current());
const GURL kChromeURL("chrome://foo");
const GURL kDestUrl("http://www.google.com/");
@@ -272,7 +272,7 @@ TEST_F(RenderViewHostManagerTest, FilterMessagesWhileSwappedOut) {
// EnableViewSourceMode message is sent on every navigation regardless
// RenderView is being newly created or reused.
TEST_F(RenderViewHostManagerTest, AlwaysSendEnableViewSourceMode) {
- BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
+ BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current());
const GURL kChromeUrl("chrome://foo");
const GURL kUrl("view-source:http://foo");
@@ -591,7 +591,7 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
// Tests WebUI creation.
TEST_F(RenderViewHostManagerTest, WebUI) {
set_should_create_webui(true);
- BrowserThreadImpl ui_thread(BrowserThread::UI, MessageLoop::current());
+ BrowserThreadImpl ui_thread(BrowserThread::UI, base::MessageLoop::current());
SiteInstance* instance = SiteInstance::Create(browser_context());
scoped_ptr<TestWebContents> web_contents(
diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc
index c66391c..8174c97 100644
--- a/content/browser/web_contents/web_contents_drag_win.cc
+++ b/content/browser/web_contents/web_contents_drag_win.cc
@@ -178,7 +178,7 @@ void WebContentsDragWin::StartDragging(const WebDropData& drop_data,
DCHECK(!drag_drop_thread_.get());
drag_drop_thread_.reset(new DragDropThread(this));
base::Thread::Options options;
- options.message_loop_type = MessageLoop::TYPE_UI;
+ options.message_loop_type = base::MessageLoop::TYPE_UI;
if (drag_drop_thread_->StartWithOptions(options)) {
drag_drop_thread_->message_loop()->PostTask(
FROM_HERE,
@@ -364,7 +364,8 @@ bool WebContentsDragWin::DoDragging(const WebDropData& drop_data,
retain_source->set_data(&data);
data.SetInDragLoop(true);
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
DoDragDrop(ui::OSExchangeDataProviderWin::GetIDataObject(data),
drag_source_,
WebDragOpMaskToWinDragOpMask(ops),
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 8e4f455..7fe338c 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -158,19 +158,20 @@ class OverscrollWindowDelegate : public ImageWindowDelegate {
// Listens to all mouse drag events during a drag and drop and sends them to
// the renderer.
-class WebDragSourceAura : public MessageLoopForUI::Observer,
+class WebDragSourceAura : public base::MessageLoopForUI::Observer,
public NotificationObserver {
public:
WebDragSourceAura(aura::Window* window, WebContentsImpl* contents)
: window_(window),
contents_(contents) {
- MessageLoopForUI::current()->AddObserver(this);
- registrar_.Add(this, NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
+ base::MessageLoopForUI::current()->AddObserver(this);
+ registrar_.Add(this,
+ NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
Source<WebContents>(contents));
}
virtual ~WebDragSourceAura() {
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
}
// MessageLoop::Observer implementation:
@@ -1114,11 +1115,15 @@ void WebContentsViewAura::StartDragging(
int result_op = 0;
{
gfx::NativeView content_native_view = GetContentNativeView();
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
- result_op = aura::client::GetDragDropClient(root_window)->StartDragAndDrop(
- data, root_window, content_native_view,
- event_info.event_location, ConvertFromWeb(operations),
- event_info.event_source);
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
+ result_op = aura::client::GetDragDropClient(root_window)
+ ->StartDragAndDrop(data,
+ root_window,
+ content_native_view,
+ event_info.event_location,
+ ConvertFromWeb(operations),
+ event_info.event_source);
}
// Bail out immediately if the contents view window is gone. Note that it is
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index f8cb4ae..cd4120e 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -138,7 +138,8 @@ void WebContentsViewMac::StartDragging(
// The drag invokes a nested event loop, arrange to continue
// processing events.
- MessageLoop::ScopedNestableTaskAllower allow(MessageLoop::current());
+ base::MessageLoop::ScopedNestableTaskAllower allow(
+ base::MessageLoop::current());
NSDragOperation mask = static_cast<NSDragOperation>(allowed_operations);
NSPoint offset = NSPointFromCGPoint(
gfx::PointAtOffsetFromOrigin(image_offset).ToCGPoint());
diff --git a/content/browser/web_contents/web_drag_dest_gtk.cc b/content/browser/web_contents/web_drag_dest_gtk.cc
index fd2763f..6973821 100644
--- a/content/browser/web_contents/web_drag_dest_gtk.cc
+++ b/content/browser/web_contents/web_drag_dest_gtk.cc
@@ -284,7 +284,8 @@ void WebDragDestGtk::OnDragLeave(GtkWidget* sender, GdkDragContext* context,
// preceded by a drag-leave. The renderer doesn't like getting the signals
// in this order so delay telling it about the drag-leave till we are sure
// we are not getting a drop as well.
- MessageLoop::current()->PostTask(FROM_HERE,
+ base::MessageLoop::current()->PostTask(
+ FROM_HERE,
base::Bind(&WebDragDestGtk::DragLeave, method_factory_.GetWeakPtr()));
}
diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc
index 2f1a1cc..05af3f5 100644
--- a/content/browser/web_contents/web_drag_source_gtk.cc
+++ b/content/browser/web_contents/web_drag_source_gtk.cc
@@ -61,7 +61,7 @@ WebDragSourceGtk::~WebDragSourceGtk() {
if (drop_data_) {
gtk_grab_add(drag_widget_);
gtk_grab_remove(drag_widget_);
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
drop_data_.reset();
}
@@ -148,7 +148,7 @@ bool WebDragSourceGtk::StartDragging(const WebDropData& drop_data,
return false;
}
- MessageLoopForUI::current()->AddObserver(this);
+ base::MessageLoopForUI::current()->AddObserver(this);
return true;
}
@@ -360,7 +360,7 @@ void WebDragSourceGtk::OnDragEnd(GtkWidget* sender,
drag_pixbuf_ = NULL;
}
- MessageLoopForUI::current()->RemoveObserver(this);
+ base::MessageLoopForUI::current()->RemoveObserver(this);
if (!download_url_.is_empty()) {
gdk_property_delete(drag_context->source_window,
diff --git a/content/browser/web_contents/web_drag_source_gtk.h b/content/browser/web_contents/web_drag_source_gtk.h
index 90b8c01..4c3381f 100644
--- a/content/browser/web_contents/web_drag_source_gtk.h
+++ b/content/browser/web_contents/web_drag_source_gtk.h
@@ -30,7 +30,8 @@ class WebContentsImpl;
// WebDragSourceGtk takes care of managing the drag from a WebContents
// with Gtk.
-class CONTENT_EXPORT WebDragSourceGtk : public MessageLoopForUI::Observer {
+class CONTENT_EXPORT WebDragSourceGtk :
+ public base::MessageLoopForUI::Observer {
public:
explicit WebDragSourceGtk(WebContents* web_contents);
virtual ~WebDragSourceGtk();