summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host')
-rw-r--r--content/browser/renderer_host/browser_render_process_host.cc10
-rw-r--r--content/browser/renderer_host/render_process_host.cc3
-rw-r--r--content/browser/renderer_host/render_view_host.cc16
-rw-r--r--content/browser/renderer_host/render_view_host_browsertest.cc13
-rw-r--r--content/browser/renderer_host/render_view_host_manager_browsertest.cc6
-rw-r--r--content/browser/renderer_host/render_widget_host.cc22
-rw-r--r--content/browser/renderer_host/render_widget_host_unittest.cc23
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.cc9
-rw-r--r--content/browser/renderer_host/render_widget_host_view_win.h14
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.cc3
-rw-r--r--content/browser/renderer_host/resource_dispatcher_host.h1
11 files changed, 63 insertions, 57 deletions
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc
index 4147ed4..0bc26f9 100644
--- a/content/browser/renderer_host/browser_render_process_host.cc
+++ b/content/browser/renderer_host/browser_render_process_host.cc
@@ -872,8 +872,8 @@ void BrowserRenderProcessHost::ProcessDied(
RendererClosedDetails details(status, exit_code, was_alive);
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
- Source<RenderProcessHost>(this),
- Details<RendererClosedDetails>(&details));
+ content::Source<RenderProcessHost>(this),
+ content::Details<RendererClosedDetails>(&details));
child_process_launcher_.reset();
channel_.reset();
@@ -902,7 +902,8 @@ void BrowserRenderProcessHost::OnShutdownRequest() {
// They should not attempt to swap them back in.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CLOSING,
- Source<RenderProcessHost>(this), NotificationService::NoDetails());
+ content::Source<RenderProcessHost>(this),
+ NotificationService::NoDetails());
Send(new ChildProcessMsg_Shutdown());
}
@@ -966,7 +967,8 @@ void BrowserRenderProcessHost::OnProcessLaunched() {
// happens.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_CREATED,
- Source<RenderProcessHost>(this), NotificationService::NoDetails());
+ content::Source<RenderProcessHost>(this),
+ NotificationService::NoDetails());
while (!queued_messages_.empty()) {
Send(queued_messages_.front());
diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc
index bf4d98a..d783884 100644
--- a/content/browser/renderer_host/render_process_host.cc
+++ b/content/browser/renderer_host/render_process_host.cc
@@ -151,7 +151,8 @@ void RenderProcessHost::Cleanup() {
if (listeners_.IsEmpty()) {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_TERMINATED,
- Source<RenderProcessHost>(this), NotificationService::NoDetails());
+ content::Source<RenderProcessHost>(this),
+ NotificationService::NoDetails());
MessageLoop::current()->DeleteSoon(FROM_HERE, this);
deleting_soon_ = true;
// It's important not to wait for the DeleteTask to delete the channel
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 964ad05..a562d54 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -32,13 +32,13 @@
#include "content/common/content_constants.h"
#include "content/common/desktop_notification_messages.h"
#include "content/common/drag_messages.h"
-#include "content/common/notification_details.h"
#include "content/common/notification_service.h"
#include "content/common/result_codes.h"
#include "content/common/speech_input_messages.h"
#include "content/common/swapped_out_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/native_web_keyboard_event.h"
+#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/bindings_policy.h"
#include "content/public/common/url_constants.h"
@@ -131,7 +131,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance,
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_CREATED,
- Source<RenderViewHost>(this),
+ content::Source<RenderViewHost>(this),
NotificationService::NoDetails());
}
@@ -141,7 +141,7 @@ RenderViewHost::~RenderViewHost() {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_DELETED,
- Source<RenderViewHost>(this),
+ content::Source<RenderViewHost>(this),
NotificationService::NoDetails());
delegate()->RenderViewDeleted(this);
@@ -368,7 +368,7 @@ void RenderViewHost::ClosePage() {
// RenderViewHosts that have been swapped out.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW,
- Source<RenderViewHost>(this),
+ content::Source<RenderViewHost>(this),
NotificationService::NoDetails());
Send(new ViewMsg_ClosePage(routing_id()));
@@ -1068,7 +1068,7 @@ void RenderViewHost::OnUpdateDragCursor(WebDragOperation current_op) {
void RenderViewHost::OnTargetDropACK() {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK,
- Source<RenderViewHost>(this),
+ content::Source<RenderViewHost>(this),
NotificationService::NoDetails());
}
@@ -1338,7 +1338,7 @@ void RenderViewHost::OnAccessibilityNotifications(
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED,
- Source<RenderViewHost>(this),
+ content::Source<RenderViewHost>(this),
NotificationService::NoDetails());
}
@@ -1355,8 +1355,8 @@ void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) {
std::pair<int, Value*> details(id, result_value);
NotificationService::current()->Notify(
content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
- Source<RenderViewHost>(this),
- Details<std::pair<int, Value*> >(&details));
+ content::Source<RenderViewHost>(this),
+ content::Details<std::pair<int, Value*> >(&details));
}
void RenderViewHost::OnDidZoomURL(double zoom_level,
diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc
index 5f9a6e1f..0bd5577 100644
--- a/content/browser/renderer_host/render_view_host_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_browsertest.cc
@@ -22,15 +22,16 @@ namespace {
// NotificationObserver used to listen for EXECUTE_JAVASCRIPT_RESULT
// notifications.
-class ExecuteNotificationObserver : public NotificationObserver {
+class ExecuteNotificationObserver : public content::NotificationObserver {
public:
ExecuteNotificationObserver() : id_(0) {}
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
- id_ = (static_cast<Details<ExecuteDetailType > >(details))->first;
- Value* value = (static_cast<Details<ExecuteDetailType > >(details))->second;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
+ id_ = (static_cast<content::Details<ExecuteDetailType > >(details))->first;
+ Value* value =
+ (static_cast<content::Details<ExecuteDetailType > >(details))->second;
if (value)
value_.reset(value->DeepCopy());
MessageLoopForUI::current()->Quit();
@@ -66,7 +67,7 @@ class RenderViewHostTest : public InProcessBrowserTest {
ui_test_utils::RegisterAndWait(
out_result,
content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT,
- Source<RenderViewHost>(rvh));
+ content::Source<RenderViewHost>(rvh));
EXPECT_EQ(execute_id, out_result->id());
ASSERT_TRUE(out_result->value());
last_execute_id_ = execute_id;
diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc
index a6f9bfb..576cf70 100644
--- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc
+++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc
@@ -12,9 +12,9 @@
#include "content/browser/renderer_host/render_view_host_observer.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/url_constants.h"
#include "net/base/net_util.h"
diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc
index 84e4d09..b98a702 100644
--- a/content/browser/renderer_host/render_widget_host.cc
+++ b/content/browser/renderer_host/render_widget_host.cc
@@ -267,8 +267,8 @@ void RenderWidgetHost::WasHidden() {
bool is_visible = false;
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
- Source<RenderWidgetHost>(this),
- Details<bool>(&is_visible));
+ content::Source<RenderWidgetHost>(this),
+ content::Details<bool>(&is_visible));
}
void RenderWidgetHost::WasRestored() {
@@ -302,8 +302,8 @@ void RenderWidgetHost::WasRestored() {
bool is_visible = true;
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED,
- Source<RenderWidgetHost>(this),
- Details<bool>(&is_visible));
+ content::Source<RenderWidgetHost>(this),
+ content::Details<bool>(&is_visible));
// It's possible for our size to be out of sync with the renderer. The
// following is one case that leads to this:
@@ -835,7 +835,7 @@ bool RenderWidgetHost::IsFullscreen() const {
void RenderWidgetHost::Destroy() {
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
- Source<RenderWidgetHost>(this),
+ content::Source<RenderWidgetHost>(this),
NotificationService::NoDetails());
// Tell the view to die.
@@ -863,7 +863,7 @@ void RenderWidgetHost::CheckRendererIsUnresponsive() {
// OK, looks like we have a hung renderer!
NotificationService::current()->Notify(
content::NOTIFICATION_RENDERER_PROCESS_HANG,
- Source<RenderWidgetHost>(this),
+ content::Source<RenderWidgetHost>(this),
NotificationService::NoDetails());
is_unresponsive_ = true;
NotifyRendererUnresponsive();
@@ -936,8 +936,8 @@ void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) {
gfx::Size size_details = size;
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
- Source<RenderWidgetHost>(this),
- Details<PaintAtSizeAckDetails>(&details));
+ content::Source<RenderWidgetHost>(this),
+ content::Details<PaintAtSizeAckDetails>(&details));
}
void RenderWidgetHost::OnMsgUpdateRect(
@@ -1040,7 +1040,7 @@ void RenderWidgetHost::OnMsgUpdateRect(
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT,
- Source<RenderWidgetHost>(this),
+ content::Source<RenderWidgetHost>(this),
NotificationService::NoDetails());
// If we got a resize ack, then perhaps we have another resize to send?
@@ -1092,8 +1092,8 @@ void RenderWidgetHost::OnMsgInputEventAck(WebInputEvent::Type event_type,
// This is used only for testing.
NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK,
- Source<RenderWidgetHost>(this),
- Details<int>(&type));
+ content::Source<RenderWidgetHost>(this),
+ content::Details<int>(&type));
}
void RenderWidgetHost::ProcessWheelAck(bool processed) {
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index c412397..8abb488 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -10,11 +10,11 @@
#include "content/browser/content_browser_client.h"
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/test_render_view_host.h"
-#include "content/common/notification_details.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/test/test_browser_context.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -204,7 +204,7 @@ class MockRenderWidgetHost : public RenderWidgetHost {
// MockPaintingObserver --------------------------------------------------------
-class MockPaintingObserver : public NotificationObserver {
+class MockPaintingObserver : public content::NotificationObserver {
public:
void WidgetDidReceivePaintAtSizeAck(RenderWidgetHost* host,
int tag,
@@ -215,14 +215,15 @@ class MockPaintingObserver : public NotificationObserver {
}
void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type ==
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK) {
RenderWidgetHost::PaintAtSizeAckDetails* size_ack_details =
- Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).ptr();
+ content::Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).
+ ptr();
WidgetDidReceivePaintAtSizeAck(
- Source<RenderWidgetHost>(source).ptr(),
+ content::Source<RenderWidgetHost>(source).ptr(),
size_ack_details->tag,
size_ack_details->size);
}
@@ -564,12 +565,12 @@ TEST_F(RenderWidgetHostTest, PaintAtSize) {
EXPECT_TRUE(
process_->sink().GetUniqueMessageMatching(ViewMsg_PaintAtSize::ID));
- NotificationRegistrar registrar;
+ content::NotificationRegistrar registrar;
MockPaintingObserver observer;
registrar.Add(
&observer,
content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK,
- Source<RenderWidgetHost>(host_.get()));
+ content::Source<RenderWidgetHost>(host_.get()));
host_->OnMsgPaintAtSizeAck(kPaintAtSizeTag, gfx::Size(20, 30));
EXPECT_EQ(host_.get(), observer.host());
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index b33bcde..40de3ae 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -1526,15 +1526,16 @@ void RenderWidgetHostViewWin::UnlockMouse() {
render_widget_host_->LostMouseLock();
}
-void RenderWidgetHostViewWin::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void RenderWidgetHostViewWin::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
DCHECK(type == content::NOTIFICATION_RENDERER_PROCESS_TERMINATED);
// Get the RenderProcessHost that posted this notification, and exit
// if it's not the one associated with this host view.
RenderProcessHost* render_process_host =
- Source<RenderProcessHost>(source).ptr();
+ content::Source<RenderProcessHost>(source).ptr();
DCHECK(render_process_host);
if (!render_widget_host_ ||
render_process_host != render_widget_host_->process())
diff --git a/content/browser/renderer_host/render_widget_host_view_win.h b/content/browser/renderer_host/render_widget_host_view_win.h
index d3a5652..72eec9b 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.h
+++ b/content/browser/renderer_host/render_widget_host_view_win.h
@@ -22,8 +22,8 @@
#include "content/browser/accessibility/browser_accessibility_manager.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
#include "content/common/content_export.h"
-#include "content/common/notification_observer.h"
-#include "content/common/notification_registrar.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
#include "ui/base/win/ime_input.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
@@ -70,7 +70,7 @@ class RenderWidgetHostViewWin
CWindow,
RenderWidgetHostHWNDTraits>,
public RenderWidgetHostView,
- public NotificationObserver,
+ public content::NotificationObserver,
public BrowserAccessibilityDelegate {
public:
// The view will associate itself with the given widget.
@@ -186,10 +186,10 @@ class RenderWidgetHostViewWin
virtual bool LockMouse() OVERRIDE;
virtual void UnlockMouse() OVERRIDE;
- // Implementation of NotificationObserver:
+ // Implementation of content::NotificationObserver:
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) OVERRIDE;
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
// Implementation of BrowserAccessibilityDelegate:
virtual void SetAccessibilityFocus(int acc_obj_id) OVERRIDE;
@@ -384,7 +384,7 @@ class RenderWidgetHostViewWin
SkColor overlay_color_;
// Registrar so we can listen to RENDERER_PROCESS_TERMINATED events.
- NotificationRegistrar registrar_;
+ content::NotificationRegistrar registrar_;
// Stores the current text input type received by TextInputStateChanged()
// method.
diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc
index 184a54a..47418bc 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host.cc
@@ -1905,7 +1905,8 @@ void ResourceDispatcherHost::NotifyOnUI(int type,
if (rvh) {
RenderViewHostDelegate* rvhd = rvh->delegate();
NotificationService::current()->Notify(
- type, Source<RenderViewHostDelegate>(rvhd), Details<T>(detail));
+ type, content::Source<RenderViewHostDelegate>(rvhd),
+ content::Details<T>(detail));
}
delete detail;
}
diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h
index 2dc5eec..86566ce 100644
--- a/content/browser/renderer_host/resource_dispatcher_host.h
+++ b/content/browser/renderer_host/resource_dispatcher_host.h
@@ -34,7 +34,6 @@
class CrossSiteResourceHandler;
class DownloadFileManager;
class LoginHandler;
-class NotificationDetails;
class PluginService;
class ResourceDispatcherHostDelegate;
class ResourceDispatcherHostRequestInfo;