Chromium Code Reviews| 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_BROWSER_NAVIGATION_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 virtual void GoBack() = 0; | 343 virtual void GoBack() = 0; |
| 344 virtual void GoForward() = 0; | 344 virtual void GoForward() = 0; |
| 345 | 345 |
| 346 // Navigates to the specified absolute index. | 346 // Navigates to the specified absolute index. |
| 347 virtual void GoToIndex(int index) = 0; | 347 virtual void GoToIndex(int index) = 0; |
| 348 | 348 |
| 349 // Navigates to the specified offset from the "current entry". Does nothing if | 349 // Navigates to the specified offset from the "current entry". Does nothing if |
| 350 // the offset is out of bounds. | 350 // the offset is out of bounds. |
| 351 virtual void GoToOffset(int offset) = 0; | 351 virtual void GoToOffset(int offset) = 0; |
| 352 | 352 |
| 353 // Reloads the current entry under the specified ReloadType. | 353 // Reloads the current entry under the specified ReloadType. If |
| 354 // TODO(toyoshim): Change all callers to use this new Reload(), and remove | 354 // |check_for_repost| is true and the current entry has POST data the user is |
| 355 // old Reload* methods below. One motivation of this change is Reload(bool) | 355 // prompted to see if they really want to reload the page. In nearly all |
| 356 // interface is just confusing because in some contexts, the bool could be to | 356 // cases pass in true. If a transient entry is showing, initiates a new |
| 357 // specify bypassing cache. http://crbug.com/670232 | 357 // navigation to its URL. |
| 358 virtual void Reload(bool check_for_repost, ReloadType reload_type) = 0; | 358 virtual void Reload(bool check_for_repost, |
| 359 | 359 ReloadType reload_type = ReloadType::NORMAL) = 0; |
|
jam
2016/12/09 17:38:40
this is not allowed by the style guide: https://go
Takashi Toyoshima
2016/12/13 11:20:32
Oops. Thanks, I'd remove default type, and reorder
| |
| 360 // Reloads the current entry. If |check_for_repost| is true and the current | |
| 361 // entry has POST data the user is prompted to see if they really want to | |
| 362 // reload the page. In nearly all cases pass in true. If a transient entry | |
| 363 // is showing, initiates a new navigation to its URL. | |
| 364 virtual void Reload(bool check_for_repost) = 0; | |
| 365 | |
| 366 // Like Reload(), but don't use caches (aka "shift-reload"). | |
| 367 virtual void ReloadBypassingCache(bool check_for_repost) = 0; | |
| 368 | |
| 369 // Reloads the current entry using the original URL used to create it. This | |
| 370 // is used for cases where the user wants to refresh a page using a different | |
| 371 // user agent after following a redirect. | |
| 372 virtual void ReloadOriginalRequestURL(bool check_for_repost) = 0; | |
| 373 | |
| 374 // Like Reload(), but disables Lo-Fi. | |
| 375 virtual void ReloadDisableLoFi(bool check_for_repost) = 0; | |
| 376 | 360 |
| 377 // Removing of entries ------------------------------------------------------- | 361 // Removing of entries ------------------------------------------------------- |
| 378 | 362 |
| 379 // Removes the entry at the specified |index|. If the index is the last | 363 // Removes the entry at the specified |index|. If the index is the last |
| 380 // committed index or the pending entry, this does nothing and returns false. | 364 // committed index or the pending entry, this does nothing and returns false. |
| 381 // Otherwise this call discards any transient or pending entries. | 365 // Otherwise this call discards any transient or pending entries. |
| 382 virtual bool RemoveEntryAtIndex(int index) = 0; | 366 virtual bool RemoveEntryAtIndex(int index) = 0; |
| 383 | 367 |
| 384 // Random -------------------------------------------------------------------- | 368 // Random -------------------------------------------------------------------- |
| 385 | 369 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 470 | 454 |
| 471 private: | 455 private: |
| 472 // This interface should only be implemented inside content. | 456 // This interface should only be implemented inside content. |
| 473 friend class NavigationControllerImpl; | 457 friend class NavigationControllerImpl; |
| 474 NavigationController() {} | 458 NavigationController() {} |
| 475 }; | 459 }; |
| 476 | 460 |
| 477 } // namespace content | 461 } // namespace content |
| 478 | 462 |
| 479 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 463 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |