| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 5 #ifndef CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 6 #define CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 | 344 |
| 345 // The transition type indicates what the user did to move to this page from | 345 // The transition type indicates what the user did to move to this page from |
| 346 // the previous page. | 346 // the previous page. |
| 347 void set_transition_type(PageTransition::Type transition_type) { | 347 void set_transition_type(PageTransition::Type transition_type) { |
| 348 transition_type_ = transition_type; | 348 transition_type_ = transition_type; |
| 349 } | 349 } |
| 350 PageTransition::Type transition_type() const { | 350 PageTransition::Type transition_type() const { |
| 351 return transition_type_; | 351 return transition_type_; |
| 352 } | 352 } |
| 353 | 353 |
| 354 // Returns whether this navigation initiated in the browser process. |
| 355 bool IsBrowserInitiated() const; |
| 356 |
| 354 // The user typed URL was the URL that the user initiated the navigation | 357 // The user typed URL was the URL that the user initiated the navigation |
| 355 // with, regardless of any redirects. This is used to generate keywords, for | 358 // with, regardless of any redirects. This is used to generate keywords, for |
| 356 // example, based on "what the user thinks the site is called" rather than | 359 // example, based on "what the user thinks the site is called" rather than |
| 357 // what it's actually called. For example, if the user types "foo.com", that | 360 // what it's actually called. For example, if the user types "foo.com", that |
| 358 // may redirect somewhere arbitrary like "bar.com/foo", and we want to use | 361 // may redirect somewhere arbitrary like "bar.com/foo", and we want to use |
| 359 // the name that the user things of the site as having. | 362 // the name that the user things of the site as having. |
| 360 // | 363 // |
| 361 // This URL will be is_empty() if the URL was navigated to some other way. | 364 // This URL will be is_empty() if the URL was navigated to some other way. |
| 362 // Callers should fall back on using the regular or display URL in this case. | 365 // Callers should fall back on using the regular or display URL in this case. |
| 363 void set_user_typed_url(const GURL& user_typed_url) { | 366 void set_user_typed_url(const GURL& user_typed_url) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // This is a cached version of the result of GetTitleForDisplay. It prevents | 436 // This is a cached version of the result of GetTitleForDisplay. It prevents |
| 434 // us from having to do URL formatting on the URL every time the title is | 437 // us from having to do URL formatting on the URL every time the title is |
| 435 // displayed. When the URL, virtual URL, or title is set, this should be | 438 // displayed. When the URL, virtual URL, or title is set, this should be |
| 436 // cleared to force a refresh. | 439 // cleared to force a refresh. |
| 437 mutable string16 cached_display_title_; | 440 mutable string16 cached_display_title_; |
| 438 | 441 |
| 439 // Copy and assignment is explicitly allowed for this class. | 442 // Copy and assignment is explicitly allowed for this class. |
| 440 }; | 443 }; |
| 441 | 444 |
| 442 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ | 445 #endif // CONTENT_BROWSER_TAB_CONTENTS_NAVIGATION_ENTRY_H_ |
| OLD | NEW |