OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 5 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/dom_operation_notification_details.h" | 8 #include "chrome/browser/dom_operation_notification_details.h" |
9 #include "chrome/browser/net/predictor_api.h" | 9 #include "chrome/browser/net/predictor_api.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
11 #include "chrome/common/render_messages.h" | 11 #include "chrome/common/render_messages.h" |
12 #include "content/browser/renderer_host/render_view_host.h" | 12 #include "content/browser/renderer_host/render_view_host.h" |
13 #include "content/browser/renderer_host/render_view_host_delegate.h" | 13 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 14 #include "chrome/common/chrome_notification_types.h" |
14 #include "content/common/notification_service.h" | 15 #include "content/common/notification_service.h" |
15 #include "content/common/url_constants.h" | 16 #include "content/common/url_constants.h" |
16 #include "content/common/view_messages.h" | 17 #include "content/common/view_messages.h" |
17 | 18 |
18 ChromeRenderViewHostObserver::ChromeRenderViewHostObserver( | 19 ChromeRenderViewHostObserver::ChromeRenderViewHostObserver( |
19 RenderViewHost* render_view_host) | 20 RenderViewHost* render_view_host) |
20 : RenderViewHostObserver(render_view_host) { | 21 : RenderViewHostObserver(render_view_host) { |
21 } | 22 } |
22 | 23 |
23 ChromeRenderViewHostObserver::~ChromeRenderViewHostObserver() { | 24 ChromeRenderViewHostObserver::~ChromeRenderViewHostObserver() { |
(...skipping 15 matching lines...) Expand all Loading... |
39 OnDomOperationResponse) | 40 OnDomOperationResponse) |
40 IPC_MESSAGE_UNHANDLED(handled = false) | 41 IPC_MESSAGE_UNHANDLED(handled = false) |
41 IPC_END_MESSAGE_MAP() | 42 IPC_END_MESSAGE_MAP() |
42 return handled; | 43 return handled; |
43 } | 44 } |
44 | 45 |
45 void ChromeRenderViewHostObserver::OnDomOperationResponse( | 46 void ChromeRenderViewHostObserver::OnDomOperationResponse( |
46 const std::string& json_string, int automation_id) { | 47 const std::string& json_string, int automation_id) { |
47 DomOperationNotificationDetails details(json_string, automation_id); | 48 DomOperationNotificationDetails details(json_string, automation_id); |
48 NotificationService::current()->Notify( | 49 NotificationService::current()->Notify( |
49 NotificationType::DOM_OPERATION_RESPONSE, | 50 chrome::NOTIFICATION_DOM_OPERATION_RESPONSE, |
50 Source<RenderViewHost>(render_view_host()), | 51 Source<RenderViewHost>(render_view_host()), |
51 Details<DomOperationNotificationDetails>(&details)); | 52 Details<DomOperationNotificationDetails>(&details)); |
52 } | 53 } |
OLD | NEW |