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 CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ | 5 #ifndef CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ |
6 #define CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ | 6 #define CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
11 #include "ui/base/page_transition_types.h" | 11 #include "ui/base/page_transition_types.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 // NavigationState is the portion of DocumentState that is affected by | 15 // NavigationState is the portion of DocumentState that is affected by |
16 // in-document navigation. | 16 // in-document navigation. |
17 // TODO(simonjam): Move this to HistoryItem's ExtraData. | 17 // TODO(simonjam): Move this to HistoryItem's ExtraData. |
18 class CONTENT_EXPORT NavigationState { | 18 class CONTENT_EXPORT NavigationState { |
19 public: | 19 public: |
20 virtual ~NavigationState(); | 20 virtual ~NavigationState(); |
21 | 21 |
22 // Contains the transition type that the browser specified when it | 22 // Contains the transition type that the browser specified when it |
23 // initiated the load. | 23 // initiated the load. |
24 virtual ui::PageTransition GetTransitionType() = 0; | 24 virtual ui::PageTransition GetTransitionType() = 0; |
25 | 25 |
26 // True iff the frame's navigation was within the same page. | 26 // True iff the frame's navigation was within the same document. |
27 virtual bool WasWithinSamePage() = 0; | 27 virtual bool WasWithinSameDocument() = 0; |
28 | 28 |
29 // True if this navigation was not initiated via WebFrame::LoadRequest. | 29 // True if this navigation was not initiated via WebFrame::LoadRequest. |
30 virtual bool IsContentInitiated() = 0; | 30 virtual bool IsContentInitiated() = 0; |
31 }; | 31 }; |
32 | 32 |
33 } // namespace content | 33 } // namespace content |
34 | 34 |
35 #endif // CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H | 35 #endif // CONTENT_PUBLIC_RENDERER_NAVIGATION_STATE_H |
OLD | NEW |