OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Implements the Chrome Extensions WebNavigation API. | 5 // Implements the Chrome Extensions WebNavigation API. |
6 | 6 |
7 #include "chrome/browser/extensions/extension_webnavigation_api.h" | 7 #include "chrome/browser/extensions/extension_webnavigation_api.h" |
8 | 8 |
9 #include "base/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/extensions/extension_event_router.h" | 12 #include "chrome/browser/extensions/extension_event_router.h" |
13 #include "chrome/browser/extensions/extension_tabs_module.h" | 13 #include "chrome/browser/extensions/extension_tabs_module.h" |
14 #include "chrome/browser/extensions/extension_webnavigation_api_constants.h" | 14 #include "chrome/browser/extensions/extension_webnavigation_api_constants.h" |
15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/tab_contents/navigation_controller.h" | 16 #include "chrome/browser/tab_contents/navigation_controller.h" |
17 #include "chrome/browser/tab_contents/provisional_load_details.h" | 17 #include "chrome/browser/tab_contents/provisional_load_details.h" |
18 #include "chrome/common/notification_type.h" | 18 #include "chrome/common/notification_type.h" |
19 #include "chrome/common/notification_service.h" | 19 #include "chrome/common/notification_service.h" |
20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
21 | 21 |
22 namespace keys = extension_webnavigation_api_constants; | 22 namespace keys = extension_webnavigation_api_constants; |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 | 284 |
285 void ExtensionWebNavigationEventRouter::DispatchEvent( | 285 void ExtensionWebNavigationEventRouter::DispatchEvent( |
286 Profile* profile, | 286 Profile* profile, |
287 const char* event_name, | 287 const char* event_name, |
288 const std::string& json_args) { | 288 const std::string& json_args) { |
289 if (profile && profile->GetExtensionEventRouter()) { | 289 if (profile && profile->GetExtensionEventRouter()) { |
290 profile->GetExtensionEventRouter()->DispatchEventToRenderers( | 290 profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
291 event_name, json_args, profile, GURL()); | 291 event_name, json_args, profile, GURL()); |
292 } | 292 } |
293 } | 293 } |
OLD | NEW |