| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/render_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "app/gfx/native_widget_types.h" | 11 #include "app/gfx/native_widget_types.h" |
| 12 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 13 #include "app/resource_bundle.h" | 13 #include "app/resource_bundle.h" |
| 14 #include "base/json_reader.h" | 14 #include "base/json/json_reader.h" |
| 15 #include "base/string_util.h" | 15 #include "base/string_util.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "base/waitable_event.h" | 17 #include "base/waitable_event.h" |
| 18 #include "chrome/browser/child_process_security_policy.h" | 18 #include "chrome/browser/child_process_security_policy.h" |
| 19 #include "chrome/browser/cross_site_request_manager.h" | 19 #include "chrome/browser/cross_site_request_manager.h" |
| 20 #include "chrome/browser/debugger/devtools_manager.h" | 20 #include "chrome/browser/debugger/devtools_manager.h" |
| 21 #include "chrome/browser/dom_operation_notification_details.h" | 21 #include "chrome/browser/dom_operation_notification_details.h" |
| 22 #include "chrome/browser/extensions/extension_message_service.h" | 22 #include "chrome/browser/extensions/extension_message_service.h" |
| 23 #include "chrome/browser/metrics/user_metrics.h" | 23 #include "chrome/browser/metrics/user_metrics.h" |
| 24 #include "chrome/browser/notifications/desktop_notification_service.h" | 24 #include "chrome/browser/notifications/desktop_notification_service.h" |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 return; | 1213 return; |
| 1214 } | 1214 } |
| 1215 | 1215 |
| 1216 // DOMUI doesn't use these values yet. | 1216 // DOMUI doesn't use these values yet. |
| 1217 // TODO(aa): When DOMUI is ported to ExtensionFunctionDispatcher, send real | 1217 // TODO(aa): When DOMUI is ported to ExtensionFunctionDispatcher, send real |
| 1218 // values here. | 1218 // values here. |
| 1219 const int kRequestId = -1; | 1219 const int kRequestId = -1; |
| 1220 const bool kHasCallback = false; | 1220 const bool kHasCallback = false; |
| 1221 scoped_ptr<Value> value; | 1221 scoped_ptr<Value> value; |
| 1222 if (!content.empty()) { | 1222 if (!content.empty()) { |
| 1223 value.reset(JSONReader::Read(content, false)); | 1223 value.reset(base::JSONReader::Read(content, false)); |
| 1224 if (!value.get()) { | 1224 if (!value.get()) { |
| 1225 // The page sent us something that we didn't understand. | 1225 // The page sent us something that we didn't understand. |
| 1226 // This probably indicates a programming error. | 1226 // This probably indicates a programming error. |
| 1227 NOTREACHED() << "Invalid JSON argument in OnMsgDOMUISend."; | 1227 NOTREACHED() << "Invalid JSON argument in OnMsgDOMUISend."; |
| 1228 return; | 1228 return; |
| 1229 } | 1229 } |
| 1230 } | 1230 } |
| 1231 | 1231 |
| 1232 delegate_->ProcessDOMUIMessage(message, value.get(), | 1232 delegate_->ProcessDOMUIMessage(message, value.get(), |
| 1233 kRequestId, kHasCallback); | 1233 kRequestId, kHasCallback); |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1724 #endif | 1724 #endif |
| 1725 } | 1725 } |
| 1726 | 1726 |
| 1727 void RenderViewHost::OnCSSInserted() { | 1727 void RenderViewHost::OnCSSInserted() { |
| 1728 delegate_->DidInsertCSS(); | 1728 delegate_->DidInsertCSS(); |
| 1729 } | 1729 } |
| 1730 | 1730 |
| 1731 void RenderViewHost::UpdateBrowserWindowId(int window_id) { | 1731 void RenderViewHost::UpdateBrowserWindowId(int window_id) { |
| 1732 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); | 1732 Send(new ViewMsg_UpdateBrowserWindowId(routing_id(), window_id)); |
| 1733 } | 1733 } |
| OLD | NEW |