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 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPERS_
H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/public/common/page_transition_types.h" | 9 #include "content/public/common/page_transition_types.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 class BrowserContext; | 12 class BrowserContext; |
13 class WebContents; | 13 class WebContents; |
14 } | 14 } |
15 | 15 |
16 class GURL; | 16 class GURL; |
17 | 17 |
18 namespace extensions { | 18 namespace extensions { |
19 | 19 |
20 namespace web_navigation_api_helpers { | 20 namespace web_navigation_api_helpers { |
21 | 21 |
22 // Returns the frame ID as it will be passed to the extension: | 22 // Returns the frame ID as it will be passed to the extension: |
23 // 0 if the navigation happens in the main frame, or the frame ID | 23 // 0 if the navigation happens in the main frame, or the frame ID |
24 // modulo 32 bits otherwise. | 24 // modulo 32 bits otherwise. |
25 int GetFrameId(bool is_main_frame, int64 frame_id); | 25 int GetFrameId(bool is_main_frame, int64 frame_id); |
26 | 26 |
27 // Create and dispatch the various events of the webNavigation API. | 27 // Create and dispatch the various events of the webNavigation API. |
28 void DispatchOnBeforeNavigate(content::WebContents* web_contents, | 28 void DispatchOnBeforeNavigate(content::WebContents* web_contents, |
| 29 int render_process_id, |
29 int64 frame_id, | 30 int64 frame_id, |
30 bool is_main_frame, | 31 bool is_main_frame, |
31 const GURL& validated_url); | 32 const GURL& validated_url); |
32 | 33 |
33 void DispatchOnCommitted(const char* event_name, | 34 void DispatchOnCommitted(const char* event_name, |
34 content::WebContents* web_contents, | 35 content::WebContents* web_contents, |
35 int64 frame_id, | 36 int64 frame_id, |
36 bool is_main_frame, | 37 bool is_main_frame, |
37 const GURL& url, | 38 const GURL& url, |
38 content::PageTransition transition_type); | 39 content::PageTransition transition_type); |
(...skipping 10 matching lines...) Expand all Loading... |
49 | 50 |
50 void DispatchOnCreatedNavigationTarget( | 51 void DispatchOnCreatedNavigationTarget( |
51 content::WebContents* web_contents, | 52 content::WebContents* web_contents, |
52 content::BrowserContext* browser_context, | 53 content::BrowserContext* browser_context, |
53 int64 source_frame_id, | 54 int64 source_frame_id, |
54 bool source_frame_is_main_frame, | 55 bool source_frame_is_main_frame, |
55 content::WebContents* target_web_contents, | 56 content::WebContents* target_web_contents, |
56 const GURL& target_url); | 57 const GURL& target_url); |
57 | 58 |
58 void DispatchOnErrorOccurred(content::WebContents* web_contents, | 59 void DispatchOnErrorOccurred(content::WebContents* web_contents, |
| 60 int render_process_id, |
59 const GURL& url, | 61 const GURL& url, |
60 int64 frame_id, | 62 int64 frame_id, |
61 bool is_main_frame, | 63 bool is_main_frame, |
62 int error_code); | 64 int error_code); |
63 | 65 |
64 void DispatchOnTabReplaced( | 66 void DispatchOnTabReplaced( |
65 content::WebContents* old_web_contents, | 67 content::WebContents* old_web_contents, |
66 content::BrowserContext* browser_context, | 68 content::BrowserContext* browser_context, |
67 content::WebContents* new_web_contents); | 69 content::WebContents* new_web_contents); |
68 | 70 |
69 } // namespace web_navigation_api_helpers | 71 } // namespace web_navigation_api_helpers |
70 | 72 |
71 } // namespace extensions | 73 } // namespace extensions |
72 | 74 |
73 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPE
RS_H_ | 75 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_NAVIGATION_WEB_NAVIGATION_API_HELPE
RS_H_ |
OLD | NEW |