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 |
|
Charlie Reis
2016/12/15 01:32:41
Just curious-- it seems like there's a lot of thes
Takashi Toyoshima
2016/12/15 06:21:52
I think this should be true unless content embedde
Charlie Reis
2016/12/15 18:44:03
Thanks for checking all these!
| |
| 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(ReloadType reload_type, bool check_for_repost) = 0; |
|
Charlie Reis
2016/12/15 01:32:41
jam@, what are your thoughts on overloads? Would
Takashi Toyoshima
2016/12/15 06:21:52
As I checked, actually there are many valid caller
Charlie Reis
2016/12/15 18:44:03
I was suggesting Plan 3 to get John's thoughts, bu
| |
| 359 | |
| 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 | 359 |
| 377 // Removing of entries ------------------------------------------------------- | 360 // Removing of entries ------------------------------------------------------- |
| 378 | 361 |
| 379 // Removes the entry at the specified |index|. If the index is the last | 362 // 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. | 363 // committed index or the pending entry, this does nothing and returns false. |
| 381 // Otherwise this call discards any transient or pending entries. | 364 // Otherwise this call discards any transient or pending entries. |
| 382 virtual bool RemoveEntryAtIndex(int index) = 0; | 365 virtual bool RemoveEntryAtIndex(int index) = 0; |
| 383 | 366 |
| 384 // Random -------------------------------------------------------------------- | 367 // Random -------------------------------------------------------------------- |
| 385 | 368 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 470 | 453 |
| 471 private: | 454 private: |
| 472 // This interface should only be implemented inside content. | 455 // This interface should only be implemented inside content. |
| 473 friend class NavigationControllerImpl; | 456 friend class NavigationControllerImpl; |
| 474 NavigationController() {} | 457 NavigationController() {} |
| 475 }; | 458 }; |
| 476 | 459 |
| 477 } // namespace content | 460 } // namespace content |
| 478 | 461 |
| 479 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 462 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
| OLD | NEW |