| 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_CONTENTS_IMPL_H_ | 5 #ifndef BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ | 6 #define BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "blimp/client/core/contents/blimp_navigation_controller_delegate.h" | 10 #include "blimp/client/core/contents/blimp_navigation_controller_delegate.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 class BlimpContentsObserver; | 26 class BlimpContentsObserver; |
| 27 class BlimpNavigationController; | 27 class BlimpNavigationController; |
| 28 | 28 |
| 29 // BlimpContentsImpl is the implementation of the core class in | 29 // BlimpContentsImpl is the implementation of the core class in |
| 30 // //blimp/client/core, the BlimpContents. | 30 // //blimp/client/core, the BlimpContents. |
| 31 class BlimpContentsImpl : public BlimpContents, | 31 class BlimpContentsImpl : public BlimpContents, |
| 32 public BlimpNavigationControllerDelegate { | 32 public BlimpNavigationControllerDelegate { |
| 33 public: | 33 public: |
| 34 BlimpContentsImpl(); | 34 BlimpContentsImpl(); |
| 35 explicit BlimpContentsImpl(int id); |
| 35 ~BlimpContentsImpl() override; | 36 ~BlimpContentsImpl() override; |
| 36 | 37 |
| 37 #if defined(OS_ANDROID) | 38 #if defined(OS_ANDROID) |
| 38 base::android::ScopedJavaLocalRef<jobject> GetJavaBlimpContentsImpl(); | 39 base::android::ScopedJavaLocalRef<jobject> GetJavaBlimpContentsImpl(); |
| 39 BlimpContentsImplAndroid* GetBlimpContentsImplAndroid(); | 40 BlimpContentsImplAndroid* GetBlimpContentsImplAndroid(); |
| 40 #endif // defined(OS_ANDROID) | 41 #endif // defined(OS_ANDROID) |
| 41 | 42 |
| 42 // BlimpContents implementation. | 43 // BlimpContents implementation. |
| 43 BlimpNavigationControllerImpl& GetNavigationController() override; | 44 BlimpNavigationControllerImpl& GetNavigationController() override; |
| 44 void AddObserver(BlimpContentsObserver* observer) override; | 45 void AddObserver(BlimpContentsObserver* observer) override; |
| 45 void RemoveObserver(BlimpContentsObserver* observer) override; | 46 void RemoveObserver(BlimpContentsObserver* observer) override; |
| 46 | 47 |
| 47 // BlimpNavigationControllerDelegate implementation. | 48 // BlimpNavigationControllerDelegate implementation. |
| 48 void NotifyURLLoaded(const GURL& url) override; | 49 void NotifyURLLoaded(const GURL& url) override; |
| 49 | 50 |
| 51 int id() { return id_; } |
| 52 |
| 50 private: | 53 private: |
| 51 // Handles the back/forward list and loading URLs. | 54 // Handles the back/forward list and loading URLs. |
| 52 BlimpNavigationControllerImpl navigation_controller_; | 55 BlimpNavigationControllerImpl navigation_controller_; |
| 53 | 56 |
| 54 // A list of all the observers of this BlimpContentsImpl. | 57 // A list of all the observers of this BlimpContentsImpl. |
| 55 base::ObserverList<BlimpContentsObserver> observers_; | 58 base::ObserverList<BlimpContentsObserver> observers_; |
| 56 | 59 |
| 60 int id_; |
| 61 |
| 57 DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl); | 62 DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl); |
| 58 }; | 63 }; |
| 59 | 64 |
| 60 } // namespace client | 65 } // namespace client |
| 61 } // namespace blimp | 66 } // namespace blimp |
| 62 | 67 |
| 63 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ | 68 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ |
| OLD | NEW |