| 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 | 38 |
| 42 private: | 39 private: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 59 // The currently active URL. | 56 // The currently active URL. |
| 60 GURL current_url_; | 57 GURL current_url_; |
| 61 | 58 |
| 62 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); | 59 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); |
| 63 }; | 60 }; |
| 64 | 61 |
| 65 } // namespace client | 62 } // namespace client |
| 66 } // namespace blimp | 63 } // namespace blimp |
| 67 | 64 |
| 68 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ | 65 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ |
| OLD | NEW |