diff options
Diffstat (limited to 'content/browser/renderer_host')
10 files changed, 32 insertions, 32 deletions
diff --git a/content/browser/renderer_host/browser_render_process_host.cc b/content/browser/renderer_host/browser_render_process_host.cc index b291d53..a50c607 100644 --- a/content/browser/renderer_host/browser_render_process_host.cc +++ b/content/browser/renderer_host/browser_render_process_host.cc @@ -812,7 +812,7 @@ void BrowserRenderProcessHost::OnChannelError() { RendererClosedDetails details(status, exit_code, is_extension_process_); NotificationService::current()->Notify( - NotificationType::RENDERER_PROCESS_CLOSED, + content::NOTIFICATION_RENDERER_PROCESS_CLOSED, Source<RenderProcessHost>(this), Details<RendererClosedDetails>(&details)); @@ -842,7 +842,7 @@ void BrowserRenderProcessHost::OnShutdownRequest() { // Notify any tabs that might have swapped out renderers from this process. // They should not attempt to swap them back in. NotificationService::current()->Notify( - NotificationType::RENDERER_PROCESS_CLOSING, + content::NOTIFICATION_RENDERER_PROCESS_CLOSING, Source<RenderProcessHost>(this), NotificationService::NoDetails()); Send(new ChildProcessMsg_Shutdown()); @@ -896,7 +896,7 @@ void BrowserRenderProcessHost::OnProcessLaunched() { // was after, we can end up executing JavaScript before the initialization // happens. NotificationService::current()->Notify( - NotificationType::RENDERER_PROCESS_CREATED, + content::NOTIFICATION_RENDERER_PROCESS_CREATED, Source<RenderProcessHost>(this), NotificationService::NoDetails()); while (!queued_messages_.empty()) { diff --git a/content/browser/renderer_host/render_process_host.cc b/content/browser/renderer_host/render_process_host.cc index f58444f..f942e04 100644 --- a/content/browser/renderer_host/render_process_host.cc +++ b/content/browser/renderer_host/render_process_host.cc @@ -130,7 +130,7 @@ void RenderProcessHost::Release(int listener_id) { // When no other owners of this object, we can delete ourselves if (listeners_.IsEmpty()) { NotificationService::current()->Notify( - NotificationType::RENDERER_PROCESS_TERMINATED, + content::NOTIFICATION_RENDERER_PROCESS_TERMINATED, Source<RenderProcessHost>(this), NotificationService::NoDetails()); MessageLoop::current()->DeleteSoon(FROM_HERE, this); deleting_soon_ = true; diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index 0e5f66b..37bf2bd 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -31,12 +31,12 @@ #include "content/browser/user_metrics.h" #include "content/common/bindings_policy.h" #include "content/common/content_constants.h" +#include "content/common/content_notification_types.h" #include "content/common/desktop_notification_messages.h" #include "content/common/drag_messages.h" #include "content/common/native_web_keyboard_event.h" #include "content/common/notification_details.h" #include "content/common/notification_service.h" -#include "content/common/notification_type.h" #include "content/common/result_codes.h" #include "content/common/swapped_out_messages.h" #include "content/common/url_constants.h" @@ -116,7 +116,7 @@ RenderViewHost::RenderViewHost(SiteInstance* instance, content::GetContentClient()->browser()->RenderViewHostCreated(this); NotificationService::current()->Notify( - NotificationType::RENDER_VIEW_HOST_CREATED, + content::NOTIFICATION_RENDER_VIEW_HOST_CREATED, Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -126,7 +126,7 @@ RenderViewHost::~RenderViewHost() { RenderViewHostObserver, observers_, RenderViewHostDestruction()); NotificationService::current()->Notify( - NotificationType::RENDER_VIEW_HOST_DELETED, + content::NOTIFICATION_RENDER_VIEW_HOST_DELETED, Source<RenderViewHost>(this), NotificationService::NoDetails()); @@ -354,7 +354,7 @@ void RenderViewHost::ClosePage() { // TODO(creis): Should this be moved to Shutdown? It may not be called for // RenderViewHosts that have been swapped out. NotificationService::current()->Notify( - NotificationType::RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, + content::NOTIFICATION_RENDER_VIEW_HOST_WILL_CLOSE_RENDER_VIEW, Source<RenderViewHost>(this), NotificationService::NoDetails()); @@ -1051,7 +1051,7 @@ void RenderViewHost::OnUpdateDragCursor(WebDragOperation current_op) { void RenderViewHost::OnTargetDropACK() { NotificationService::current()->Notify( - NotificationType::RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, + content::NOTIFICATION_RENDER_VIEW_HOST_DID_RECEIVE_DRAG_TARGET_DROP_ACK, Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -1248,7 +1248,7 @@ void RenderViewHost::OnAccessibilityNotifications( } NotificationService::current()->Notify( - NotificationType::RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, + content::NOTIFICATION_RENDER_VIEW_HOST_ACCESSIBILITY_TREE_UPDATED, Source<RenderViewHost>(this), NotificationService::NoDetails()); } @@ -1265,7 +1265,7 @@ void RenderViewHost::OnScriptEvalResponse(int id, const ListValue& result) { } std::pair<int, Value*> details(id, result_value); NotificationService::current()->Notify( - NotificationType::EXECUTE_JAVASCRIPT_RESULT, + content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, Source<RenderViewHost>(this), Details<std::pair<int, Value*> >(&details)); } diff --git a/content/browser/renderer_host/render_view_host_browsertest.cc b/content/browser/renderer_host/render_view_host_browsertest.cc index 116dbec..4d22de0 100644 --- a/content/browser/renderer_host/render_view_host_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_browsertest.cc @@ -26,7 +26,7 @@ class ExecuteNotificationObserver : public NotificationObserver { public: ExecuteNotificationObserver() : id_(0) {} - virtual void Observe(NotificationType type, + virtual void Observe(int type, const NotificationSource& source, const NotificationDetails& details) { id_ = (static_cast<Details<ExecuteDetailType > >(details))->first; @@ -65,7 +65,7 @@ class RenderViewHostTest : public InProcessBrowserTest { ExecuteNotificationObserver observer; ui_test_utils::RegisterAndWait( out_result, - NotificationType::EXECUTE_JAVASCRIPT_RESULT, + content::NOTIFICATION_EXECUTE_JAVASCRIPT_RESULT, Source<RenderViewHost>(rvh)); EXPECT_EQ(execute_id, out_result->id()); ASSERT_TRUE(out_result->value()); 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 8a9ebce..7f36823 100644 --- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc @@ -11,10 +11,10 @@ #include "chrome/test/ui_test_utils.h" #include "content/browser/site_instance.h" #include "content/browser/tab_contents/tab_contents.h" +#include "content/common/content_notification_types.h" #include "content/common/notification_details.h" #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" -#include "content/common/notification_type.h" #include "net/base/net_util.h" #include "net/test/test_server.h" diff --git a/content/browser/renderer_host/render_widget_host.cc b/content/browser/renderer_host/render_widget_host.cc index 4e01606..00df753 100644 --- a/content/browser/renderer_host/render_widget_host.cc +++ b/content/browser/renderer_host/render_widget_host.cc @@ -249,7 +249,7 @@ void RenderWidgetHost::WasHidden() { bool is_visible = false; NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_VISIBILITY_CHANGED, + content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, Source<RenderWidgetHost>(this), Details<bool>(&is_visible)); } @@ -284,7 +284,7 @@ void RenderWidgetHost::WasRestored() { bool is_visible = true; NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_VISIBILITY_CHANGED, + content::NOTIFICATION_RENDER_WIDGET_VISIBILITY_CHANGED, Source<RenderWidgetHost>(this), Details<bool>(&is_visible)); @@ -757,7 +757,7 @@ void RenderWidgetHost::ImeCancelComposition() { void RenderWidgetHost::Destroy() { NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_HOST_DESTROYED, + content::NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, Source<RenderWidgetHost>(this), NotificationService::NoDetails()); @@ -785,7 +785,7 @@ void RenderWidgetHost::CheckRendererIsUnresponsive() { // OK, looks like we have a hung renderer! NotificationService::current()->Notify( - NotificationType::RENDERER_PROCESS_HANG, + content::NOTIFICATION_RENDERER_PROCESS_HANG, Source<RenderWidgetHost>(this), NotificationService::NoDetails()); is_unresponsive_ = true; @@ -858,7 +858,7 @@ void RenderWidgetHost::OnMsgPaintAtSizeAck(int tag, const gfx::Size& size) { PaintAtSizeAckDetails details = {tag, size}; gfx::Size size_details = size; NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, + content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, Source<RenderWidgetHost>(this), Details<PaintAtSizeAckDetails>(&details)); } @@ -869,7 +869,7 @@ void RenderWidgetHost::OnMsgUpdateRect( TimeTicks paint_start = TimeTicks::Now(); NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_HOST_WILL_PAINT, + content::NOTIFICATION_RENDER_WIDGET_HOST_WILL_PAINT, Source<RenderWidgetHost>(this), NotificationService::NoDetails()); @@ -966,7 +966,7 @@ void RenderWidgetHost::OnMsgUpdateRect( } NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_HOST_DID_PAINT, + content::NOTIFICATION_RENDER_WIDGET_HOST_DID_PAINT, Source<RenderWidgetHost>(this), NotificationService::NoDetails()); @@ -1024,7 +1024,7 @@ void RenderWidgetHost::OnMsgInputEventAck(const IPC::Message& message) { } // This is used only for testing. NotificationService::current()->Notify( - NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, + content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_INPUT_EVENT_ACK, Source<RenderWidgetHost>(this), Details<int>(&type)); } diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc index 17c8108..42a3cf0 100644 --- a/content/browser/renderer_host/render_widget_host_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_unittest.cc @@ -219,11 +219,11 @@ class MockPaintingObserver : public NotificationObserver { size_ = size; } - void Observe(NotificationType type, + void Observe(int type, const NotificationSource& source, const NotificationDetails& details) { if (type == - NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK) { + content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK) { RenderWidgetHost::PaintAtSizeAckDetails* size_ack_details = Details<RenderWidgetHost::PaintAtSizeAckDetails>(details).ptr(); WidgetDidReceivePaintAtSizeAck( @@ -574,7 +574,7 @@ TEST_F(RenderWidgetHostTest, PaintAtSize) { MockPaintingObserver observer; registrar.Add( &observer, - NotificationType::RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, + content::NOTIFICATION_RENDER_WIDGET_HOST_DID_RECEIVE_PAINT_AT_SIZE_ACK, Source<RenderWidgetHost>(host_.get())); host_->OnMsgPaintAtSizeAck(kPaintAtSizeTag, gfx::Size(20, 30)); diff --git a/content/browser/renderer_host/resource_dispatcher_host.cc b/content/browser/renderer_host/resource_dispatcher_host.cc index 2fcdca3..cefab8b 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.cc +++ b/content/browser/renderer_host/resource_dispatcher_host.cc @@ -1655,7 +1655,7 @@ void ResourceDispatcherHost::NotifyResponseStarted(net::URLRequest* request, BrowserThread::UI, FROM_HERE, NewRunnableFunction( &ResourceDispatcherHost::NotifyOnUI<ResourceRequestDetails>, - NotificationType::RESOURCE_RESPONSE_STARTED, + content::NOTIFICATION_RESOURCE_RESPONSE_STARTED, render_process_id, render_view_id, detail)); } @@ -1673,12 +1673,12 @@ void ResourceDispatcherHost::NotifyReceivedRedirect(net::URLRequest* request, BrowserThread::UI, FROM_HERE, NewRunnableFunction( &ResourceDispatcherHost::NotifyOnUI<ResourceRedirectDetails>, - NotificationType::RESOURCE_RECEIVED_REDIRECT, + content::NOTIFICATION_RESOURCE_RECEIVED_REDIRECT, render_process_id, render_view_id, detail)); } template <class T> -void ResourceDispatcherHost::NotifyOnUI(NotificationType type, +void ResourceDispatcherHost::NotifyOnUI(int type, int render_process_id, int render_view_id, T* detail) { diff --git a/content/browser/renderer_host/resource_dispatcher_host.h b/content/browser/renderer_host/resource_dispatcher_host.h index ee476d0..35f5106 100644 --- a/content/browser/renderer_host/resource_dispatcher_host.h +++ b/content/browser/renderer_host/resource_dispatcher_host.h @@ -23,7 +23,7 @@ #include "base/timer.h" #include "content/browser/renderer_host/resource_queue.h" #include "content/common/child_process_info.h" -#include "content/common/notification_type.h" +#include "content/common/content_notification_types.h" #include "ipc/ipc_message.h" #include "net/url_request/url_request.h" #include "webkit/glue/resource_type.h" @@ -407,7 +407,7 @@ class ResourceDispatcherHost : public net::URLRequest::Delegate { // Sends the given notification on the UI thread. The RenderViewHost's // controller is used as the source. template <class T> - static void NotifyOnUI(NotificationType type, + static void NotifyOnUI(int type, int render_process_id, int render_view_id, T* detail); diff --git a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc index 846ca3b..14be3f5 100644 --- a/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc +++ b/content/browser/renderer_host/resource_dispatcher_host_browsertest.cc @@ -5,10 +5,10 @@ #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/browser/ui/browser.h" +#include "chrome/common/chrome_notification_types.h" #include "chrome/test/in_process_browser_test.h" #include "chrome/test/ui_test_utils.h" #include "content/browser/tab_contents/tab_contents.h" -#include "content/common/notification_type.h" #include "net/test/test_server.h" class ResourceDispatcherHostBrowserTest : public InProcessBrowserTest { @@ -30,7 +30,7 @@ bool ResourceDispatcherHostBrowserTest::GetPopupTitle(const GURL& url, ui_test_utils::NavigateToURL(browser(), url); ui_test_utils::WindowedNotificationObserver observer( - NotificationType::BROWSER_WINDOW_READY, + chrome::NOTIFICATION_BROWSER_WINDOW_READY, NotificationService::AllSources()); // Create dynamic popup. |