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

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

Issue 2292343002: Hooking up Blimp IME with BlimpContents (Closed)
Patch Set: Fixed linux client 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 18 matching lines...) Expand all
29 int id, 29 int id,
30 gfx::NativeWindow window, 30 gfx::NativeWindow window,
31 BlimpCompositorDependencies* compositor_deps, 31 BlimpCompositorDependencies* compositor_deps,
32 ImeFeature* ime_feature, 32 ImeFeature* ime_feature,
33 NavigationFeature* navigation_feature, 33 NavigationFeature* navigation_feature,
34 RenderWidgetFeature* render_widget_feature, 34 RenderWidgetFeature* render_widget_feature,
35 TabControlFeature* tab_control_feature) 35 TabControlFeature* tab_control_feature)
36 : navigation_controller_(this, navigation_feature), 36 : navigation_controller_(this, navigation_feature),
37 compositor_manager_(render_widget_feature, compositor_deps), 37 compositor_manager_(render_widget_feature, compositor_deps),
38 id_(id), 38 id_(id),
39 ime_feature_(ime_feature),
39 window_(window), 40 window_(window),
40 tab_control_feature_(tab_control_feature) { 41 tab_control_feature_(tab_control_feature) {
41 blimp_contents_view_ = 42 blimp_contents_view_ =
42 BlimpContentsView::Create(this, compositor_manager_.layer()); 43 BlimpContentsView::Create(this, compositor_manager_.layer());
44 ime_feature_->set_delegate(blimp_contents_view_->GetImeDelegate());
43 } 45 }
44 46
45 BlimpContentsImpl::~BlimpContentsImpl() { 47 BlimpContentsImpl::~BlimpContentsImpl() {
46 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying()); 48 FOR_EACH_OBSERVER(BlimpContentsObserver, observers_, BlimpContentsDying());
49 ime_feature_->set_delegate(nullptr);
47 } 50 }
48 51
49 #if defined(OS_ANDROID) 52 #if defined(OS_ANDROID)
50 53
51 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() { 54 base::android::ScopedJavaLocalRef<jobject> BlimpContentsImpl::GetJavaObject() {
52 return GetBlimpContentsImplAndroid()->GetJavaObject(); 55 return GetBlimpContentsImplAndroid()->GetJavaObject();
53 } 56 }
54 57
55 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() { 58 BlimpContentsImplAndroid* BlimpContentsImpl::GetBlimpContentsImplAndroid() {
56 BlimpContentsImplAndroid* blimp_contents_impl_android = 59 BlimpContentsImplAndroid* blimp_contents_impl_android =
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 float device_pixel_ratio) { 109 float device_pixel_ratio) {
107 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio); 110 tab_control_feature_->SetSizeAndScale(size, device_pixel_ratio);
108 } 111 }
109 112
110 BlimpContentsView* BlimpContentsImpl::GetBlimpContentsView() { 113 BlimpContentsView* BlimpContentsImpl::GetBlimpContentsView() {
111 return blimp_contents_view_.get(); 114 return blimp_contents_view_.get();
112 } 115 }
113 116
114 } // namespace client 117 } // namespace client
115 } // namespace blimp 118 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/contents/blimp_contents_impl.h ('k') | blimp/client/core/contents/blimp_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698