OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/api/web_navigation/web_navigation_api.h" | 7 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
11 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta
nts.h" | 11 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta
nts.h" |
12 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helper
s.h" | 12 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_helper
s.h" |
13 #include "chrome/browser/extensions/extension_system.h" | |
14 #include "chrome/browser/extensions/extension_tab_util.h" | 13 #include "chrome/browser/extensions/extension_tab_util.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/tab_contents/retargeting_details.h" | 15 #include "chrome/browser/tab_contents/retargeting_details.h" |
17 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/browser_iterator.h" | 17 #include "chrome/browser/ui/browser_iterator.h" |
19 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
20 #include "chrome/common/extensions/api/web_navigation.h" | 19 #include "chrome/common/extensions/api/web_navigation.h" |
21 #include "content/public/browser/navigation_details.h" | 20 #include "content/public/browser/navigation_details.h" |
22 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
23 #include "content/public/browser/notification_types.h" | 22 #include "content/public/browser/notification_types.h" |
24 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
25 #include "content/public/browser/render_view_host.h" | 24 #include "content/public/browser/render_view_host.h" |
26 #include "content/public/browser/resource_request_details.h" | 25 #include "content/public/browser/resource_request_details.h" |
27 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
28 #include "content/public/common/url_constants.h" | 27 #include "content/public/common/url_constants.h" |
29 #include "extensions/browser/event_router.h" | 28 #include "extensions/browser/event_router.h" |
| 29 #include "extensions/browser/extension_system.h" |
30 #include "extensions/browser/view_type_utils.h" | 30 #include "extensions/browser/view_type_utils.h" |
31 #include "net/base/net_errors.h" | 31 #include "net/base/net_errors.h" |
32 | 32 |
33 namespace GetFrame = extensions::api::web_navigation::GetFrame; | 33 namespace GetFrame = extensions::api::web_navigation::GetFrame; |
34 namespace GetAllFrames = extensions::api::web_navigation::GetAllFrames; | 34 namespace GetAllFrames = extensions::api::web_navigation::GetAllFrames; |
35 | 35 |
36 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::WebNavigationTabObserver); | 36 DEFINE_WEB_CONTENTS_USER_DATA_KEY(extensions::WebNavigationTabObserver); |
37 | 37 |
38 namespace extensions { | 38 namespace extensions { |
39 | 39 |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 } | 837 } |
838 | 838 |
839 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { | 839 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { |
840 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_)); | 840 web_navigation_event_router_.reset(new WebNavigationEventRouter(profile_)); |
841 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); | 841 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); |
842 } | 842 } |
843 | 843 |
844 #endif // OS_ANDROID | 844 #endif // OS_ANDROID |
845 | 845 |
846 } // namespace extensions | 846 } // namespace extensions |
OLD | NEW |