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

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

Issue 2292343002: Hooking up Blimp IME with BlimpContents (Closed)
Patch Set: Addressed initial comments Created 4 years, 3 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/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"
(...skipping 12 matching lines...) Expand all
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(int id,
28 ImeFeature* ime_feature, 28 ImeFeature* ime_feature,
29 NavigationFeature* navigation_feature, 29 NavigationFeature* navigation_feature,
30 TabControlFeature* tab_control_feature) 30 TabControlFeature* tab_control_feature)
31 : navigation_controller_(this, navigation_feature), 31 : navigation_controller_(this, navigation_feature),
32 id_(id), 32 id_(id),
33 ime_feature_(ime_feature),
33 tab_control_feature_(tab_control_feature) { 34 tab_control_feature_(tab_control_feature) {
34 blimp_contents_view_ = BlimpContentsView::Create(this); 35 blimp_contents_view_ = BlimpContentsView::Create(this);
36 ime_feature_->set_delegate(blimp_contents_view_->GetImeDelegate());
35 } 37 }
36 38
37 BlimpContentsImpl::~BlimpContentsImpl() { 39 BlimpContentsImpl::~BlimpContentsImpl() {
38 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying()); 40 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying());
41 ime_feature_->set_delegate(nullptr);
39 } 42 }
40 43
41 #if defined(OS_ANDROID) 44 #if defined(OS_ANDROID)
42 45
43 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() { 46 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() {
44 return GetBlimpContentsImplAndroid()->GetJavaObject(); 47 return GetBlimpContentsImplAndroid()->GetJavaObject();
45 } 48 }
46 49
47 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() { 50 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() {
48 BlimpContentsImplAndroid* blimp_contents_impl_android = 51 BlimpContentsImplAndroid* blimp_contents_impl_android =
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 OnNavigationStateChanged()); 85 OnNavigationStateChanged());
83 } 86 }
84 87
85 void BlimpContentsImpl::SetSizeAndScale(const gfx::Size& size, 88 void BlimpContentsImpl::SetSizeAndScale(const gfx::Size& size,
86 float device_pixel_ratio) { 89 float device_pixel_ratio) {
87 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio); 90 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio);
88 } 91 }
89 92
90 } // namespace client 93 } // namespace client
91 } // namespace blimp 94 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698