| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_H_ | |
| 6 #define BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "url/gurl.h" | |
| 10 | |
| 11 namespace blimp { | |
| 12 namespace client { | |
| 13 | |
| 14 // The BlimpNavigationController maintains the back-forward list for a | |
| 15 // BlimpContents and manages all navigation within that list. | |
| 16 // | |
| 17 // Each BlimpNavigationController belongs to one BlimpContents, and each | |
| 18 // BlimpContents has exactly one BlimpNavigationController. | |
| 19 class BlimpNavigationController { | |
| 20 public: | |
| 21 virtual ~BlimpNavigationController() = default; | |
| 22 | |
| 23 // Calls to LoadURL informs the engine that it should start navigating to the | |
| 24 // provided |url|. | |
| 25 virtual void LoadURL(const GURL& url) = 0; | |
| 26 | |
| 27 // Reloads the current entry. | |
| 28 virtual void Reload() = 0; | |
| 29 | |
| 30 // Navigation relative to the "current entry". | |
| 31 virtual bool CanGoBack() const = 0; | |
| 32 virtual bool CanGoForward() const = 0; | |
| 33 virtual void GoBack() = 0; | |
| 34 virtual void GoForward() = 0; | |
| 35 | |
| 36 // Retrieves the URL of the currently selected item in the navigation list. | |
| 37 virtual const GURL& GetURL() = 0; | |
| 38 | |
| 39 // Gets the current page title. | |
| 40 virtual const std::string& GetTitle() = 0; | |
| 41 | |
| 42 protected: | |
| 43 BlimpNavigationController() {} | |
| 44 | |
| 45 private: | |
| 46 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationController); | |
| 47 }; | |
| 48 | |
| 49 } // namespace client | |
| 50 } // namespace blimp | |
| 51 | |
| 52 #endif // BLIMP_CLIENT_PUBLIC_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_H_ | |
| OLD | NEW |