| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ | 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ | 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "blimp/client/core/contents/navigation_feature.h" | 9 #include "blimp/client/core/contents/navigation_feature.h" |
| 10 #include "blimp/client/public/contents/blimp_navigation_controller.h" | 10 #include "blimp/client/public/contents/blimp_navigation_controller.h" |
| 11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
| 12 | 12 |
| 13 class SkBitmap; | 13 class SkBitmap; |
| 14 | 14 |
| 15 namespace blimp { | 15 namespace blimp { |
| 16 namespace client { | 16 namespace client { |
| 17 | 17 |
| 18 class BlimpContentsObserver; | 18 class BlimpContentsObserver; |
| 19 class BlimpNavigationControllerDelegate; | 19 class BlimpNavigationControllerDelegate; |
| 20 | 20 |
| 21 class BlimpNavigationControllerImpl | 21 class BlimpNavigationControllerImpl |
| 22 : public BlimpNavigationController, | 22 : public BlimpNavigationController, |
| 23 public NavigationFeature::NavigationFeatureDelegate { | 23 public NavigationFeature::NavigationFeatureDelegate { |
| 24 public: | 24 public: |
| 25 // The life time of |feature| must remain valid throughout |this|. | 25 // The life time of |feature| must remain valid throughout |this|. |
| 26 BlimpNavigationControllerImpl(BlimpNavigationControllerDelegate* delegate, | 26 BlimpNavigationControllerImpl(BlimpNavigationControllerDelegate* delegate, |
| 27 NavigationFeature* feature); | 27 NavigationFeature* feature); |
| 28 ~BlimpNavigationControllerImpl() override; | 28 ~BlimpNavigationControllerImpl() override; |
| 29 | 29 |
| 30 // For testing only. | |
| 31 void SetNavigationFeatureForTesting(NavigationFeature* feature); | |
| 32 | |
| 33 // BlimpNavigationController implementation. | 30 // BlimpNavigationController implementation. |
| 34 void LoadURL(const GURL& url) override; | 31 void LoadURL(const GURL& url) override; |
| 35 void Reload() override; | 32 void Reload() override; |
| 36 bool CanGoBack() const override; | 33 bool CanGoBack() const override; |
| 37 bool CanGoForward() const override; | 34 bool CanGoForward() const override; |
| 38 void GoBack() override; | 35 void GoBack() override; |
| 39 void GoForward() override; | 36 void GoForward() override; |
| 40 const GURL& GetURL() override; | 37 const GURL& GetURL() override; |
| 41 const std::string& GetTitle(); | 38 const std::string& GetTitle(); |
| 42 | 39 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 63 // Title of the currently active page. | 60 // Title of the currently active page. |
| 64 std::string current_title_; | 61 std::string current_title_; |
| 65 | 62 |
| 66 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); | 63 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); |
| 67 }; | 64 }; |
| 68 | 65 |
| 69 } // namespace client | 66 } // namespace client |
| 70 } // namespace blimp | 67 } // namespace blimp |
| 71 | 68 |
| 72 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ | 69 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |