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

Side by Side Diff: blimp/client/core/blimp_client_context_impl.cc

Issue 2191743002: Setup the delegate in Chrome, so we may put chrome java functions we need in blimp to the delegate … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resovle merge conflicts. 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/blimp_client_context_impl.h" 5 #include "blimp/client/core/blimp_client_context_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/core/contents/blimp_contents_impl.h" 9 #include "blimp/client/core/contents/blimp_contents_impl.h"
10 #include "blimp/client/public/blimp_client_context_delegate.h" 10 #include "blimp/client/public/blimp_client_context_delegate.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 return blimp_client_contents_impl_android; 58 return blimp_client_contents_impl_android;
59 } 59 }
60 60
61 #endif // defined(OS_ANDROID) 61 #endif // defined(OS_ANDROID)
62 62
63 void BlimpClientContextImpl::SetDelegate(BlimpClientContextDelegate* delegate) { 63 void BlimpClientContextImpl::SetDelegate(BlimpClientContextDelegate* delegate) {
64 delegate_ = delegate; 64 delegate_ = delegate;
65 } 65 }
66 66
67 BlimpClientContextDelegate* BlimpClientContextImpl::GetDelegate() {
68 return delegate_;
69 }
70
67 std::unique_ptr<BlimpContents> BlimpClientContextImpl::CreateBlimpContents() { 71 std::unique_ptr<BlimpContents> BlimpClientContextImpl::CreateBlimpContents() {
68 std::unique_ptr<BlimpContents> blimp_contents = 72 std::unique_ptr<BlimpContents> blimp_contents =
69 base::WrapUnique(new BlimpContentsImpl); 73 base::WrapUnique(new BlimpContentsImpl);
70 delegate_->AttachBlimpContentsHelpers(blimp_contents.get()); 74 delegate_->AttachBlimpContentsHelpers(blimp_contents.get());
71 return blimp_contents; 75 return blimp_contents;
72 } 76 }
73 77
74 } // namespace client 78 } // namespace client
75 } // namespace blimp 79 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698