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_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/core/contents/blimp_contents_view.h" | 9 #include "blimp/client/core/contents/blimp_contents_view.h" |
| 10 #include "blimp/client/core/contents/tab_control_feature.h" | 10 #include "blimp/client/core/contents/tab_control_feature.h" |
| 11 #include "blimp/client/public/contents/blimp_contents_observer.h" | 11 #include "blimp/client/public/contents/blimp_contents_observer.h" |
| 12 | 12 |
| 13 #if defined(OS_ANDROID) | 13 #if defined(OS_ANDROID) |
| 14 #include "blimp/client/core/contents/android/blimp_contents_impl_android.h" | 14 #include "blimp/client/core/contents/android/blimp_contents_impl_android.h" |
| 15 #endif // OS_ANDROID | 15 #endif // OS_ANDROID |
| 16 | 16 |
| 17 namespace blimp { | 17 namespace blimp { |
| 18 namespace client { | 18 namespace client { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 #if defined(OS_ANDROID) | 22 #if defined(OS_ANDROID) |
| 23 const char kBlimpContentsImplAndroidKey[] = "blimp_contents_impl_android"; | 23 const char kBlimpContentsImplAndroidKey[] = "blimp_contents_impl_android"; |
| 24 #endif // OS_ANDROID | 24 #endif // OS_ANDROID |
| 25 } | 25 } |
| 26 | 26 |
| 27 BlimpContentsImpl::BlimpContentsImpl(int id, | 27 BlimpContentsImpl::BlimpContentsImpl( |
|
Khushal
2016/08/31 04:30:47
Add a method to show/hide the BlimpContents and fo
David Trainor- moved to gerrit
2016/08/31 05:21:26
Done.
| |
| 28 ImeFeature* ime_feature, | 28 int id, |
| 29 NavigationFeature* navigation_feature, | 29 BlimpCompositorDependencies* compositor_deps, |
| 30 TabControlFeature* tab_control_feature) | 30 ImeFeature* ime_feature, |
| 31 NavigationFeature* navigation_feature, | |
| 32 RenderWidgetFeature* render_widget_feature, | |
| 33 TabControlFeature* tab_control_feature) | |
| 31 : navigation_controller_(this, navigation_feature), | 34 : navigation_controller_(this, navigation_feature), |
| 35 compositor_manager_(render_widget_feature, compositor_deps), | |
|
Khushal
2016/08/31 04:30:47
Now that we have this, we can set the layer correc
David Trainor- moved to gerrit
2016/08/31 05:21:27
Done.
| |
| 32 id_(id), | 36 id_(id), |
| 33 tab_control_feature_(tab_control_feature) { | 37 tab_control_feature_(tab_control_feature) { |
| 34 blimp_contents_view_ = BlimpContentsView::Create(this); | 38 blimp_contents_view_ = BlimpContentsView::Create(this); |
| 35 } | 39 } |
| 36 | 40 |
| 37 BlimpContentsImpl::~BlimpContentsImpl() { | 41 BlimpContentsImpl::~BlimpContentsImpl() { |
| 38 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying()); | 42 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying()); |
| 39 } | 43 } |
| 40 | 44 |
| 41 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 OnNavigationStateChanged()); | 86 OnNavigationStateChanged()); |
| 83 } | 87 } |
| 84 | 88 |
| 85 void BlimpContentsImpl::SetSizeAndScale(const gfx::Size& size, | 89 void BlimpContentsImpl::SetSizeAndScale(const gfx::Size& size, |
| 86 float device_pixel_ratio) { | 90 float device_pixel_ratio) { |
| 87 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio); | 91 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio); |
| 88 } | 92 } |
| 89 | 93 |
| 90 } // namespace client | 94 } // namespace client |
| 91 } // namespace blimp | 95 } // namespace blimp |
| OLD | NEW |