| 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_tab_util.h" | 13 #include "chrome/browser/extensions/extension_tab_util.h" |
| 14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
| 15 #include "chrome/browser/tab_contents/retargeting_details.h" | 15 #include "chrome/browser/tab_contents/retargeting_details.h" |
| 16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
| 17 #include "chrome/browser/ui/browser_iterator.h" | |
| 18 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
| 19 #include "chrome/common/extensions/api/web_navigation.h" | 18 #include "chrome/common/extensions/api/web_navigation.h" |
| 20 #include "content/public/browser/navigation_details.h" | 19 #include "content/public/browser/navigation_details.h" |
| 21 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
| 22 #include "content/public/browser/notification_types.h" | 21 #include "content/public/browser/notification_types.h" |
| 23 #include "content/public/browser/render_frame_host.h" | 22 #include "content/public/browser/render_frame_host.h" |
| 24 #include "content/public/browser/render_process_host.h" | 23 #include "content/public/browser/render_process_host.h" |
| 25 #include "content/public/browser/resource_request_details.h" | 24 #include "content/public/browser/resource_request_details.h" |
| 26 #include "content/public/browser/web_contents.h" | 25 #include "content/public/browser/web_contents.h" |
| 27 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 return g_factory.Pointer(); | 616 return g_factory.Pointer(); |
| 618 } | 617 } |
| 619 | 618 |
| 620 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { | 619 void WebNavigationAPI::OnListenerAdded(const EventListenerInfo& details) { |
| 621 web_navigation_event_router_.reset(new WebNavigationEventRouter( | 620 web_navigation_event_router_.reset(new WebNavigationEventRouter( |
| 622 Profile::FromBrowserContext(browser_context_))); | 621 Profile::FromBrowserContext(browser_context_))); |
| 623 EventRouter::Get(browser_context_)->UnregisterObserver(this); | 622 EventRouter::Get(browser_context_)->UnregisterObserver(this); |
| 624 } | 623 } |
| 625 | 624 |
| 626 } // namespace extensions | 625 } // namespace extensions |
| OLD | NEW |