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

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

Issue 2233023002: Adding BlimpNavigationController to Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nav_handler_remove
Patch Set: 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 #include "blimp/client/core/contents/blimp_contents_impl.h" 5 #include "blimp/client/core/contents/blimp_contents_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/supports_user_data.h" 8 #include "base/supports_user_data.h"
9 #include "blimp/client/public/contents/blimp_contents_observer.h" 9 #include "blimp/client/public/contents/blimp_contents_observer.h"
10 10
(...skipping 11 matching lines...) Expand all
22 #endif // OS_ANDROID 22 #endif // OS_ANDROID
23 } 23 }
24 24
25 BlimpContentsImpl::BlimpContentsImpl() 25 BlimpContentsImpl::BlimpContentsImpl()
26 : navigation_controller_(this, nullptr) {} 26 : navigation_controller_(this, nullptr) {}
27 27
28 BlimpContentsImpl::~BlimpContentsImpl() {} 28 BlimpContentsImpl::~BlimpContentsImpl() {}
29 29
30 #if defined(OS_ANDROID) 30 #if defined(OS_ANDROID)
31 31
32 base::android::ScopedJavaLocalRef<jobject> 32 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() {
33 BlimpContentsImpl::GetJavaBlimpContentsImpl() {
34 return GetBlimpContentsImplAndroid()->GetJavaObject(); 33 return GetBlimpContentsImplAndroid()->GetJavaObject();
35 } 34 }
36 35
37 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() { 36 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() {
38 BlimpContentsImplAndroid* blimp_contents_impl_android = 37 BlimpContentsImplAndroid* blimp_contents_impl_android =
39 static_cast<BlimpContentsImplAndroid*>( 38 static_cast<BlimpContentsImplAndroid*>(
40 GetUserData(kBlimpContentsImplAndroidKey)); 39 GetUserData(kBlimpContentsImplAndroidKey));
41 if (!blimp_contents_impl_android) { 40 if (!blimp_contents_impl_android) {
42 blimp_contents_impl_android = new BlimpContentsImplAndroid(this); 41 blimp_contents_impl_android = new BlimpContentsImplAndroid(this);
43 SetUserData(kBlimpContentsImplAndroidKey, blimp_contents_impl_android); 42 SetUserData(kBlimpContentsImplAndroidKey, blimp_contents_impl_android);
(...skipping 15 matching lines...) Expand all
59 observers_.RemoveObserver(observer); 58 observers_.RemoveObserver(observer);
60 } 59 }
61 60
62 void BlimpContentsImpl::OnNavigationStateChanged() { 61 void BlimpContentsImpl::OnNavigationStateChanged() {
63 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, 62 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_,
64 OnNavigationStateChanged()); 63 OnNavigationStateChanged());
65 } 64 }
66 65
67 } // namespace client 66 } // namespace client
68 } // namespace blimp 67 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698