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" |
(...skipping 20 matching lines...) Expand all Loading... | |
31 void SetNavigationFeatureForTesting(NavigationFeature* feature); | 31 void SetNavigationFeatureForTesting(NavigationFeature* feature); |
32 | 32 |
33 // BlimpNavigationController implementation. | 33 // BlimpNavigationController implementation. |
34 void LoadURL(const GURL& url) override; | 34 void LoadURL(const GURL& url) override; |
35 void Reload() override; | 35 void Reload() override; |
36 bool CanGoBack() const override; | 36 bool CanGoBack() const override; |
37 bool CanGoForward() const override; | 37 bool CanGoForward() const override; |
38 void GoBack() override; | 38 void GoBack() override; |
39 void GoForward() override; | 39 void GoForward() override; |
40 const GURL& GetURL() override; | 40 const GURL& GetURL() override; |
41 const std::string& GetTitle(); | |
41 | 42 |
42 private: | 43 private: |
43 // NavigationFeatureDelegate implementation. | 44 // NavigationFeatureDelegate implementation. |
44 void OnUrlChanged(int tab_id, const GURL& url) override; | 45 void OnUrlChanged(int tab_id, const GURL& url) override; |
45 void OnFaviconChanged(int tab_id, const SkBitmap& favicon) override; | 46 void OnFaviconChanged(int tab_id, const SkBitmap& favicon) override; |
46 void OnTitleChanged(int tab_id, const std::string& title) override; | 47 void OnTitleChanged(int tab_id, const std::string& title) override; |
47 void OnLoadingChanged(int tab_id, bool loading) override; | 48 void OnLoadingChanged(int tab_id, bool loading) override; |
48 void OnPageLoadStatusUpdate(int tab_id, bool completed) override; | 49 void OnPageLoadStatusUpdate(int tab_id, bool completed) override; |
49 | 50 |
50 // The |navigation_feature_| is responsible for sending and receiving the | 51 // The |navigation_feature_| is responsible for sending and receiving the |
51 // navigation state to the server over the proto channel. | 52 // navigation state to the server over the proto channel. |
52 NavigationFeature* navigation_feature_; | 53 NavigationFeature* navigation_feature_; |
53 | 54 |
54 // The delegate contains functionality required for the navigation controller | 55 // The delegate contains functionality required for the navigation controller |
55 // to function correctly. It is also invoked on relevant state changes of the | 56 // to function correctly. It is also invoked on relevant state changes of the |
56 // navigation controller. | 57 // navigation controller. |
57 BlimpNavigationControllerDelegate* delegate_; | 58 BlimpNavigationControllerDelegate* delegate_; |
58 | 59 |
59 // The currently active URL. | 60 // The currently active URL. |
60 GURL current_url_; | 61 GURL current_url_; |
62 std::string current_title_; | |
David Trainor- moved to gerrit
2016/08/11 21:40:19
Maybe comment?
shaktisahu
2016/08/12 22:11:48
Done.
| |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); | 64 DISALLOW_COPY_AND_ASSIGN(BlimpNavigationControllerImpl); |
63 }; | 65 }; |
64 | 66 |
65 } // namespace client | 67 } // namespace client |
66 } // namespace blimp | 68 } // namespace blimp |
67 | 69 |
68 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ | 70 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_NAVIGATION_CONTROLLER_IMPL_H_ |
OLD | NEW |