Chromium Code Reviews| 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 #include "blimp/client/core/contents/blimp_contents_view_android.h" | 5 #include "blimp/client/core/contents/blimp_contents_view_android.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "blimp/client/core/contents/android/blimp_contents_impl_android.h" | 8 #include "blimp/client/core/contents/android/blimp_contents_impl_android.h" |
| 9 #include "blimp/client/core/contents/android/ime_helper_dialog.h" | |
| 9 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| 10 | 11 |
| 11 namespace blimp { | 12 namespace blimp { |
| 12 namespace client { | 13 namespace client { |
| 13 | 14 |
| 14 // static | 15 // static |
| 15 std::unique_ptr<BlimpContentsView> BlimpContentsView::Create( | 16 std::unique_ptr<BlimpContentsView> BlimpContentsView::Create( |
| 16 BlimpContentsImpl* blimp_contents) { | 17 BlimpContentsImpl* blimp_contents) { |
| 17 return base::MakeUnique<BlimpContentsViewAndroid>( | 18 return base::MakeUnique<BlimpContentsViewAndroid>( |
| 18 blimp_contents->GetBlimpContentsImplAndroid()); | 19 blimp_contents->GetBlimpContentsImplAndroid()); |
| 19 } | 20 } |
| 20 | 21 |
| 21 BlimpContentsViewAndroid::BlimpContentsViewAndroid( | 22 BlimpContentsViewAndroid::BlimpContentsViewAndroid( |
| 22 BlimpContentsImplAndroid* blimp_contents) { | 23 BlimpContentsImplAndroid* blimp_contents) { |
| 23 // TODO(khushalsagar): Get the ViewAndroidDelegate from java after it has a | 24 // TODO(khushalsagar): Get the ViewAndroidDelegate from java after it has a |
| 24 // BlimpView. Also get the WindowAndroid so this view can add itself as a | 25 // BlimpView. Also get the WindowAndroid so this view can add itself as a |
| 25 // child to it. | 26 // child to it. |
| 26 // TODO(dtrainor): Use the layer from the compositor manager here instead when | 27 // TODO(dtrainor): Use the layer from the compositor manager here instead when |
| 27 // it goes in the BlimpContents. | 28 // it goes in the BlimpContents. |
| 28 view_.SetLayer(cc::Layer::Create()); | 29 view_.SetLayer(cc::Layer::Create()); |
| 30 ime_dialog_.reset(new ImeHelperDialog(view_.GetWindowAndroid())); | |
|
David Trainor- moved to gerrit
2016/08/31 05:59:10
Let's put this in the constructor, we can access t
shaktisahu
2016/08/31 17:28:21
I had to do blimp_contents->blimp_contents_impl()-
David Trainor- moved to gerrit
2016/08/31 18:59:54
Ah make the constructor take a BlimpClientsImpl()
| |
| 29 } | 31 } |
| 30 | 32 |
| 33 BlimpContentsViewAndroid::~BlimpContentsViewAndroid() {} | |
|
David Trainor- moved to gerrit
2016/08/31 05:59:10
= default?
shaktisahu
2016/08/31 17:28:21
Doesn't work. "Complex destructor has an inline bo
shaktisahu
2016/08/31 17:28:21
Done.
David Trainor- moved to gerrit
2016/08/31 18:59:54
= default; should be fine in the cc file though ri
| |
| 34 | |
| 31 gfx::NativeView BlimpContentsViewAndroid::GetNativeView() { | 35 gfx::NativeView BlimpContentsViewAndroid::GetNativeView() { |
| 32 return &view_; | 36 return &view_; |
| 33 } | 37 } |
| 34 | 38 |
| 39 ImeFeature::Delegate* BlimpContentsViewAndroid::GetImeDelegate() { | |
| 40 return ime_dialog_.get(); | |
| 41 } | |
| 42 | |
| 35 } // namespace client | 43 } // namespace client |
| 36 } // namespace blimp | 44 } // namespace blimp |
| OLD | NEW |