Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: blimp/client/core/contents/blimp_contents_impl.h

Issue 2201433002: Migrate TabControlFeature from 0.5 to 0.6 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git add blimp/client/public/contents/blimp_contents_observer.cc Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 #if defined(OS_ANDROID) 22 #if defined(OS_ANDROID)
23 class BlimpContentsImplAndroid; 23 class BlimpContentsImplAndroid;
24 #endif // defined(OS_ANDROID) 24 #endif // defined(OS_ANDROID)
25 25
26 class BlimpContentsObserver; 26 class BlimpContentsObserver;
27 class BlimpNavigationController; 27 class BlimpNavigationController;
28 28
29 class BlimpContentsImpl : public BlimpContents, 29 class BlimpContentsImpl : public BlimpContents,
30 public BlimpNavigationControllerDelegate { 30 public BlimpNavigationControllerDelegate {
31 public: 31 public:
32 BlimpContentsImpl(); 32 explicit BlimpContentsImpl(int id);
33 ~BlimpContentsImpl() override; 33 ~BlimpContentsImpl() override;
34 34
35 #if defined(OS_ANDROID) 35 #if defined(OS_ANDROID)
36 base::android::ScopedJavaLocalRef<jobject> GetJavaBlimpContentsImpl(); 36 base::android::ScopedJavaLocalRef<jobject> GetJavaBlimpContentsImpl();
37 BlimpContentsImplAndroid* GetBlimpContentsImplAndroid(); 37 BlimpContentsImplAndroid* GetBlimpContentsImplAndroid();
38 #endif // defined(OS_ANDROID) 38 #endif // defined(OS_ANDROID)
39 39
40 // BlimpContents implementation. 40 // BlimpContents implementation.
41 BlimpNavigationControllerImpl& GetNavigationController() override; 41 BlimpNavigationControllerImpl& GetNavigationController() override;
42 void AddObserver(BlimpContentsObserver* observer) override; 42 void AddObserver(BlimpContentsObserver* observer) override;
43 void RemoveObserver(BlimpContentsObserver* observer) override; 43 void RemoveObserver(BlimpContentsObserver* observer) override;
44 44
45 // BlimpNavigationControllerDelegate implementation. 45 // BlimpNavigationControllerDelegate implementation.
46 void OnNavigationStateChanged() override; 46 void OnNavigationStateChanged() override;
47 47
48 int id() { return id_; }
49
48 private: 50 private:
49 // Handles the back/forward list and loading URLs. 51 // Handles the back/forward list and loading URLs.
50 BlimpNavigationControllerImpl navigation_controller_; 52 BlimpNavigationControllerImpl navigation_controller_;
51 53
52 // A list of all the observers of this BlimpContentsImpl. 54 // A list of all the observers of this BlimpContentsImpl.
53 base::ObserverList<BlimpContentsObserver> observers_; 55 base::ObserverList<BlimpContentsObserver> observers_;
54 56
55 DISALLOW_COPY_AND_ASSIGN(BlimpContentsImpl); 57 int id_;
nyquist 2016/08/05 23:03:22 Could you explain what this ID is for?
Menglin 2016/08/05 23:37:15 yeah, when a BlimpContentsImpl is destroyed, its B
Menglin 2016/08/06 00:57:00 comments added
58
59 DISALLOW_IMPLICIT_CONSTRUCTORS(BlimpContentsImpl);
nyquist 2016/08/05 23:03:23 Is there a reason we can't DISALLOW_COPY_AND_ASSIG
Menglin 2016/08/05 23:37:15 since I removed BlimpContentsImpl(), and I had a c
Menglin 2016/08/06 00:57:00 Sorry i double checked. there is no problem using
56 }; 60 };
57 61
58 } // namespace client 62 } // namespace client
59 } // namespace blimp 63 } // namespace blimp
60 64
61 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_ 65 #endif // BLIMP_CLIENT_CORE_CONTENTS_BLIMP_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698