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

Side by Side Diff: mandoline/ui/aura/window_tree_host_mojo.cc

Issue 1286383003: Mandoline: Enable Android software keyboard for the Omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review issues Created 5 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
« no previous file with comments | « mandoline/ui/aura/input_method_mandoline.cc ('k') | mandoline/ui/omnibox/omnibox_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mandoline/ui/aura/window_tree_host_mojo.h" 5 #include "mandoline/ui/aura/window_tree_host_mojo.h"
6 6
7 #include "components/view_manager/public/cpp/view_manager.h" 7 #include "components/view_manager/public/cpp/view_manager.h"
8 #include "mandoline/ui/aura/input_method_mandoline.h" 8 #include "mandoline/ui/aura/input_method_mandoline.h"
9 #include "mandoline/ui/aura/surface_context_factory.h" 9 #include "mandoline/ui/aura/surface_context_factory.h"
10 #include "mojo/application/public/interfaces/shell.mojom.h" 10 #include "mojo/application/public/interfaces/shell.mojom.h"
(...skipping 17 matching lines...) Expand all
28 // WindowTreeHost creates the compositor using the ContextFactory from 28 // WindowTreeHost creates the compositor using the ContextFactory from
29 // aura::Env. Install |context_factory_| there so that |context_factory_| is 29 // aura::Env. Install |context_factory_| there so that |context_factory_| is
30 // picked up. 30 // picked up.
31 ui::ContextFactory* default_context_factory = 31 ui::ContextFactory* default_context_factory =
32 aura::Env::GetInstance()->context_factory(); 32 aura::Env::GetInstance()->context_factory();
33 aura::Env::GetInstance()->set_context_factory(context_factory_.get()); 33 aura::Env::GetInstance()->set_context_factory(context_factory_.get());
34 CreateCompositor(GetAcceleratedWidget()); 34 CreateCompositor(GetAcceleratedWidget());
35 aura::Env::GetInstance()->set_context_factory(default_context_factory); 35 aura::Env::GetInstance()->set_context_factory(default_context_factory);
36 DCHECK_EQ(context_factory_.get(), compositor()->context_factory()); 36 DCHECK_EQ(context_factory_.get(), compositor()->context_factory());
37 37
38 input_method_.reset(new InputMethodMandoline(this)); 38 input_method_.reset(new InputMethodMandoline(this, view_));
39 SetSharedInputMethod(input_method_.get()); 39 SetSharedInputMethod(input_method_.get());
40 } 40 }
41 41
42 WindowTreeHostMojo::~WindowTreeHostMojo() { 42 WindowTreeHostMojo::~WindowTreeHostMojo() {
43 view_->RemoveObserver(this); 43 view_->RemoveObserver(this);
44 DestroyCompositor(); 44 DestroyCompositor();
45 DestroyDispatcher(); 45 DestroyDispatcher();
46 } 46 }
47 47
48 //////////////////////////////////////////////////////////////////////////////// 48 ////////////////////////////////////////////////////////////////////////////////
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 gfx::Rect old_bounds2 = old_bounds.To<gfx::Rect>(); 105 gfx::Rect old_bounds2 = old_bounds.To<gfx::Rect>();
106 gfx::Rect new_bounds2 = new_bounds.To<gfx::Rect>(); 106 gfx::Rect new_bounds2 = new_bounds.To<gfx::Rect>();
107 bounds_ = new_bounds2; 107 bounds_ = new_bounds2;
108 if (old_bounds2.origin() != new_bounds2.origin()) 108 if (old_bounds2.origin() != new_bounds2.origin())
109 OnHostMoved(bounds_.origin()); 109 OnHostMoved(bounds_.origin());
110 if (old_bounds2.size() != new_bounds2.size()) 110 if (old_bounds2.size() != new_bounds2.size())
111 OnHostResized(bounds_.size()); 111 OnHostResized(bounds_.size());
112 } 112 }
113 113
114 } // namespace mandoline 114 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/aura/input_method_mandoline.cc ('k') | mandoline/ui/omnibox/omnibox_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698