Add window.gc back to Smoothness.WillNavigateToPageHook
[chromium-blink-merge.git] / content / public / common / frame_navigate_params.h
blobe3b93342eda2c3e2eac1fe4a8023e418a037e9bc
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_COMMON_FRAME_NAVIGATE_PARAMS_H_
6 #define CONTENT_PUBLIC_COMMON_FRAME_NAVIGATE_PARAMS_H_
8 #include <string>
9 #include <vector>
11 #include "content/common/content_export.h"
12 #include "content/public/common/referrer.h"
13 #include "net/base/host_port_pair.h"
14 #include "ui/base/page_transition_types.h"
15 #include "url/gurl.h"
17 namespace content {
19 // Struct used by WebContentsObserver.
20 struct CONTENT_EXPORT FrameNavigateParams {
21 FrameNavigateParams();
22 ~FrameNavigateParams();
24 // Page ID of this navigation. The renderer creates a new unique page ID
25 // anytime a new session history entry is created. This means you'll get new
26 // page IDs for user actions, and the old page IDs will be reloaded when
27 // iframes are loaded automatically.
28 int32 page_id;
30 // The unique ID of the NavigationEntry for browser-initiated navigations.
31 // This value was given to the render process in the HistoryNavigationParams
32 // and is being returned by the renderer without it having any idea what it
33 // means. If the navigation was renderer-initiated, this value is 0.
34 int nav_entry_id;
36 // The item sequence number identifies each stop in the session history. It
37 // is unique within the renderer process and makes a best effort to be unique
38 // across browser sessions (using a renderer process timestamp).
39 int64 item_sequence_number;
41 // The document sequence number is used to identify cross-document navigations
42 // in session history. It increments for each new document and is unique in
43 // the same way as |item_sequence_number|. In-page navigations get a new item
44 // sequence number but the same document sequence number.
45 int64 document_sequence_number;
47 // URL of the page being loaded.
48 GURL url;
50 // The base URL for the page's document when the frame was committed. Empty if
51 // similar to 'url' above. Note that any base element in the page has not been
52 // parsed yet and is therefore not reflected.
53 // This is of interest when a MHTML file is loaded, as the base URL has been
54 // set to original URL of the site the MHTML represents.
55 GURL base_url;
57 // URL of the referrer of this load. WebKit generates this based on the
58 // source of the event that caused the load.
59 content::Referrer referrer;
61 // The type of transition.
62 ui::PageTransition transition;
64 // Lists the redirects that occurred on the way to the current page. This
65 // vector has the same format as reported by the WebDataSource in the glue,
66 // with the current page being the last one in the list (so even when
67 // there's no redirect, there will be one entry in the list.
68 std::vector<GURL> redirects;
70 // Set to false if we want to update the session history but not update
71 // the browser history. E.g., on unreachable urls.
72 bool should_update_history;
74 // See SearchableFormData for a description of these.
75 GURL searchable_form_url;
76 std::string searchable_form_encoding;
78 // Contents MIME type of main frame.
79 std::string contents_mime_type;
81 // Remote address of the socket which fetched this resource.
82 net::HostPortPair socket_address;
85 } // namespace content
87 #endif // CONTENT_PUBLIC_COMMON_FRAME_NAVIGATE_PARAMS_H_