| 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 SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ | 5 #ifndef SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ |
| 6 #define SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ | 6 #define SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/observer_list.h" | 8 #include "base/observer_list.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "mojo/public/cpp/bindings/binding.h" | 10 #include "mojo/public/cpp/bindings/binding.h" |
| 11 #include "services/navigation/public/interfaces/view.mojom.h" | 11 #include "services/navigation/public/interfaces/view.mojom.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace aura { |
| 14 class Window; | 14 class Window; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace navigation { | 17 namespace navigation { |
| 18 | 18 |
| 19 class ViewDelegate; | 19 class ViewDelegate; |
| 20 class ViewObserver; | 20 class ViewObserver; |
| 21 | 21 |
| 22 // Represents an item in a View's navigation list. | 22 // Represents an item in a View's navigation list. |
| 23 struct NavigationListItem { | 23 struct NavigationListItem { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 // Reload/Stop. | 61 // Reload/Stop. |
| 62 void Reload(bool bypass_cache); | 62 void Reload(bool bypass_cache); |
| 63 void Stop(); | 63 void Stop(); |
| 64 | 64 |
| 65 // Interstitials. | 65 // Interstitials. |
| 66 void ShowInterstitial(const std::string& html); | 66 void ShowInterstitial(const std::string& html); |
| 67 void HideInterstitial(); | 67 void HideInterstitial(); |
| 68 | 68 |
| 69 // Embed the View visually within |parent|. | 69 // Embed the View visually within |parent|. |
| 70 void EmbedInWindow(ui::Window* parent); | 70 void EmbedInWindow(aura::Window* parent); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 // mojom::ViewClient: | 73 // mojom::ViewClient: |
| 74 void OpenURL(mojom::OpenURLParamsPtr params) override; | 74 void OpenURL(mojom::OpenURLParamsPtr params) override; |
| 75 void LoadingStateChanged(bool is_loading) override; | 75 void LoadingStateChanged(bool is_loading) override; |
| 76 void NavigationStateChanged(const GURL& url, | 76 void NavigationStateChanged(const GURL& url, |
| 77 const std::string& title, | 77 const std::string& title, |
| 78 bool can_go_back, | 78 bool can_go_back, |
| 79 bool can_go_forward) override; | 79 bool can_go_forward) override; |
| 80 void LoadProgressChanged(double progress) override; | 80 void LoadProgressChanged(double progress) override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 105 bool can_go_forward_ = false; | 105 bool can_go_forward_ = false; |
| 106 | 106 |
| 107 mojom::NavigationEntryPtr pending_navigation_; | 107 mojom::NavigationEntryPtr pending_navigation_; |
| 108 std::vector<mojom::NavigationEntryPtr> navigation_list_; | 108 std::vector<mojom::NavigationEntryPtr> navigation_list_; |
| 109 int navigation_list_cursor_ = 0; | 109 int navigation_list_cursor_ = 0; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 } // namespace navigation | 112 } // namespace navigation |
| 113 | 113 |
| 114 #endif // SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ | 114 #endif // SERVICES_NAVIGATION_PUBLIC_CPP_VIEW_H_ |
| OLD | NEW |