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> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
16 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
19 #include "content/public/browser/global_request_id.h" | 19 #include "content/public/browser/global_request_id.h" |
20 #include "content/public/browser/reload_type.h" | |
20 #include "content/public/browser/restore_type.h" | 21 #include "content/public/browser/restore_type.h" |
21 #include "content/public/browser/session_storage_namespace.h" | 22 #include "content/public/browser/session_storage_namespace.h" |
22 #include "content/public/browser/site_instance.h" | 23 #include "content/public/browser/site_instance.h" |
23 #include "content/public/common/referrer.h" | 24 #include "content/public/common/referrer.h" |
24 #include "content/public/common/resource_request_body.h" | 25 #include "content/public/common/resource_request_body.h" |
25 #include "ui/base/page_transition_types.h" | 26 #include "ui/base/page_transition_types.h" |
26 #include "url/gurl.h" | 27 #include "url/gurl.h" |
27 | 28 |
28 namespace base { | 29 namespace base { |
29 | 30 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
342 virtual void GoBack() = 0; | 343 virtual void GoBack() = 0; |
343 virtual void GoForward() = 0; | 344 virtual void GoForward() = 0; |
344 | 345 |
345 // Navigates to the specified absolute index. | 346 // Navigates to the specified absolute index. |
346 virtual void GoToIndex(int index) = 0; | 347 virtual void GoToIndex(int index) = 0; |
347 | 348 |
348 // 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 |
349 // the offset is out of bounds. | 350 // the offset is out of bounds. |
350 virtual void GoToOffset(int offset) = 0; | 351 virtual void GoToOffset(int offset) = 0; |
351 | 352 |
353 // Reloads the current entry under the speicified ReloadType. This will | |
Charlie Reis
2016/12/05 19:34:00
nit: specified
nit: We don't need the second sente
Takashi Toyoshima
2016/12/06 08:10:42
Done.
| |
354 // replace Reload* methods below. | |
355 // TODO(toyoshim): Change all callers to use this new Reload(), and remove | |
356 // old Reload* methods below. One motivation of this change is Reload(bool) | |
357 // interface is just confusing because in some contexts, the bool could be to | |
358 // specify bypassing cache. http://crbug.com/670232 | |
359 virtual void Reload(bool check_for_repost, ReloadType reload_type) = 0; | |
Charlie Reis
2016/12/05 19:34:00
I'm wondering if it would be worth reversing the o
Takashi Toyoshima
2016/12/06 08:10:42
One pros of current order is that we can set a def
Charlie Reis
2016/12/08 23:41:23
I'm generally not a fan of default arguments, but
| |
360 | |
352 // Reloads the current entry. If |check_for_repost| is true and the current | 361 // Reloads the current entry. If |check_for_repost| is true and the current |
353 // entry has POST data the user is prompted to see if they really want to | 362 // entry has POST data the user is prompted to see if they really want to |
354 // reload the page. In nearly all cases pass in true. If a transient entry | 363 // reload the page. In nearly all cases pass in true. If a transient entry |
355 // is showing, initiates a new navigation to its URL. | 364 // is showing, initiates a new navigation to its URL. |
356 virtual void Reload(bool check_for_repost) = 0; | 365 virtual void Reload(bool check_for_repost) = 0; |
357 | 366 |
358 // Like Reload(), but don't use caches (aka "shift-reload"). | 367 // Like Reload(), but don't use caches (aka "shift-reload"). |
359 virtual void ReloadBypassingCache(bool check_for_repost) = 0; | 368 virtual void ReloadBypassingCache(bool check_for_repost) = 0; |
360 | 369 |
361 // Reloads the current entry using the original URL used to create it. This | 370 // Reloads the current entry using the original URL used to create it. This |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 | 471 |
463 private: | 472 private: |
464 // This interface should only be implemented inside content. | 473 // This interface should only be implemented inside content. |
465 friend class NavigationControllerImpl; | 474 friend class NavigationControllerImpl; |
466 NavigationController() {} | 475 NavigationController() {} |
467 }; | 476 }; |
468 | 477 |
469 } // namespace content | 478 } // namespace content |
470 | 479 |
471 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ | 480 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_CONTROLLER_H_ |
OLD | NEW |