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/json/json_writer.h" | 9 #include "base/json/json_writer.h" |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta
nts.h" | 14 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api_consta
nts.h" |
15 #include "chrome/browser/extensions/extension_event_router.h" | 15 #include "chrome/browser/extensions/extension_event_router.h" |
16 #include "chrome/browser/extensions/extension_tab_util.h" | 16 #include "chrome/browser/extensions/extension_tab_util.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "chrome/browser/tab_contents/retargeting_details.h" | 18 #include "chrome/browser/tab_contents/retargeting_details.h" |
19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 19 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "chrome/common/chrome_view_type.h" | 21 #include "chrome/common/chrome_view_type.h" |
22 #include "chrome/common/url_constants.h" | 22 #include "chrome/common/url_constants.h" |
23 #include "content/public/browser/resource_request_details.h" | 23 #include "content/public/browser/resource_request_details.h" |
24 #include "content/public/browser/navigation_details.h" | 24 #include "content/public/browser/navigation_details.h" |
25 #include "content/public/browser/notification_service.h" | 25 #include "content/public/browser/notification_service.h" |
26 #include "content/public/browser/notification_types.h" | 26 #include "content/public/browser/notification_types.h" |
27 #include "content/public/browser/render_view_host.h" | 27 #include "content/public/browser/render_view_host.h" |
28 #include "content/public/browser/render_view_host_delegate.h" | |
29 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
30 #include "net/base/net_errors.h" | 29 #include "net/base/net_errors.h" |
31 | 30 |
32 using content::BrowserContext; | 31 using content::BrowserContext; |
33 using content::ResourceRedirectDetails; | 32 using content::ResourceRedirectDetails; |
34 using content::WebContents; | 33 using content::WebContents; |
35 | 34 |
36 namespace extensions { | 35 namespace extensions { |
37 | 36 |
38 namespace keys = web_navigation_api_constants; | 37 namespace keys = web_navigation_api_constants; |
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 frameDict->SetBoolean( | 803 frameDict->SetBoolean( |
805 keys::kErrorOccurredKey, | 804 keys::kErrorOccurredKey, |
806 navigation_state.GetErrorOccurredInFrame(*frame)); | 805 navigation_state.GetErrorOccurredInFrame(*frame)); |
807 resultList->Append(frameDict); | 806 resultList->Append(frameDict); |
808 } | 807 } |
809 result_.reset(resultList); | 808 result_.reset(resultList); |
810 return true; | 809 return true; |
811 } | 810 } |
812 | 811 |
813 } // namespace extensions | 812 } // namespace extensions |
OLD | NEW |