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

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: @nyquist feedback 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 13 matching lines...) Expand all
24 24
25 BlimpContentsImpl::BlimpContentsImpl(int id) 25 BlimpContentsImpl::BlimpContentsImpl(int id)
26 : navigation_controller_(this, nullptr), id_(id) {} 26 : navigation_controller_(this, nullptr), id_(id) {}
27 27
28 BlimpContentsImpl::~BlimpContentsImpl() { 28 BlimpContentsImpl::~BlimpContentsImpl() {
29 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying()); 29 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying());
30 } 30 }
31 31
32 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
33 33
34 base::android::ScopedJavaLocalRef<jobject> 34 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() {
35 BlimpContentsImpl::GetJavaBlimpContentsImpl() {
36 return GetBlimpContentsImplAndroid()->GetJavaObject(); 35 return GetBlimpContentsImplAndroid()->GetJavaObject();
37 } 36 }
38 37
39 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() { 38 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() {
40 BlimpContentsImplAndroid* blimp_contents_impl_android = 39 BlimpContentsImplAndroid* blimp_contents_impl_android =
41 static_cast<BlimpContentsImplAndroid*>( 40 static_cast<BlimpContentsImplAndroid*>(
42 GetUserData(kBlimpContentsImplAndroidKey)); 41 GetUserData(kBlimpContentsImplAndroidKey));
43 if (!blimp_contents_impl_android) { 42 if (!blimp_contents_impl_android) {
44 blimp_contents_impl_android = new BlimpContentsImplAndroid(this); 43 blimp_contents_impl_android = new BlimpContentsImplAndroid(this);
45 SetUserData(kBlimpContentsImplAndroidKey, blimp_contents_impl_android); 44 SetUserData(kBlimpContentsImplAndroidKey, blimp_contents_impl_android);
(...skipping 19 matching lines...) Expand all
65 return observers_.HasObserver(observer); 64 return observers_.HasObserver(observer);
66 } 65 }
67 66
68 void BlimpContentsImpl::OnNavigationStateChanged() { 67 void BlimpContentsImpl::OnNavigationStateChanged() {
69 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, 68 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_,
70 OnNavigationStateChanged()); 69 OnNavigationStateChanged());
71 } 70 }
72 71
73 } // namespace client 72 } // namespace client
74 } // namespace blimp 73 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698