OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_TYPES_H_ | |
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_TYPES_H_ | |
7 #pragma once | |
8 | |
9 namespace content { | |
10 | |
11 // Indicates different types of navigations that can occur that we will handle | |
12 // separately. | |
13 enum NavigationType { | |
14 // Unknown type. | |
15 NAVIGATION_TYPE_UNKNOWN, | |
16 | |
17 // A new page was navigated in the main frame. | |
18 NAVIGATION_TYPE_NEW_PAGE, | |
19 | |
20 // Renavigating to an existing navigation entry. The entry is guaranteed to | |
21 // exist in the list, or else it would be a new page or IGNORE navigation. | |
22 NAVIGATION_TYPE_EXISTING_PAGE, | |
23 | |
24 // The same page has been reloaded as a result of the user requesting | |
25 // navigation to that same page (like pressing Enter in the URL bar). This | |
26 // is not the same as an in-page navigation because we'll actually have a | |
27 // pending entry for the load, which is then meaningless. | |
28 NAVIGATION_TYPE_SAME_PAGE, | |
29 | |
30 // In page navigations are when the reference fragment changes. This will | |
31 // be in the main frame only (we won't even get notified of in-page | |
32 // subframe navigations). It may be for any page, not necessarily the last | |
33 // committed one (for example, whey going back to a page with a ref). | |
34 NAVIGATION_TYPE_IN_PAGE, | |
35 | |
36 // A new subframe was manually navigated by the user. We will create a new | |
37 // NavigationEntry so they can go back to the previous subframe content | |
38 // using the back button. | |
39 NAVIGATION_TYPE_NEW_SUBFRAME, | |
40 | |
41 // A subframe in the page was automatically loaded or navigated to such that | |
42 // a new navigation entry should not be created. There are two cases: | |
43 // 1. Stuff like iframes containing ads that the page loads automatically. | |
44 // The user doesn't want to see these, so we just update the existing | |
45 // navigation entry. | |
46 // 2. Going back/forward to previous subframe navigations. We don't create | |
47 // a new entry here either, just update the last committed entry. | |
48 // These two cases are actually pretty different, they just happen to | |
49 // require almost the same code to handle. | |
50 NAVIGATION_TYPE_AUTO_SUBFRAME, | |
51 | |
52 // Nothing happened. This happens when we get information about a page we | |
53 // don't know anything about. It can also happen when an iframe in a popup | |
54 // navigated to about:blank is navigated. Nothing needs to be done. | |
55 NAVIGATION_TYPE_NAV_IGNORE, | |
56 }; | |
57 | |
58 } // namespace content | |
59 | |
60 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_TYPES_H_ | |
OLD | NEW |