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

Side by Side Diff: ui/keyboard/content/keyboard_ui_content.cc

Issue 2968943002: Remove LoadSystemKeyboard() (Closed)
Patch Set: Created 3 years, 5 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 | « ui/keyboard/content/keyboard_ui_content.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/keyboard/content/keyboard_ui_content.h" 5 #include "ui/keyboard/content/keyboard_ui_content.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "content/public/browser/render_widget_host.h" 10 #include "content/public/browser/render_widget_host.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 KeyboardUIContent::KeyboardUIContent(content::BrowserContext* context) 167 KeyboardUIContent::KeyboardUIContent(content::BrowserContext* context)
168 : browser_context_(context), 168 : browser_context_(context),
169 default_url_(kKeyboardURL), 169 default_url_(kKeyboardURL),
170 window_bounds_observer_(new WindowBoundsChangeObserver(this)) { 170 window_bounds_observer_(new WindowBoundsChangeObserver(this)) {
171 } 171 }
172 172
173 KeyboardUIContent::~KeyboardUIContent() { 173 KeyboardUIContent::~KeyboardUIContent() {
174 ResetInsets(); 174 ResetInsets();
175 } 175 }
176 176
177 void KeyboardUIContent::LoadSystemKeyboard() {
178 DCHECK(keyboard_contents_);
179 if (keyboard_contents_->GetURL() != default_url_) {
180 // TODO(bshe): The height of system virtual keyboard and IME virtual
181 // keyboard may different. The height needs to be restored too.
182 LoadContents(default_url_);
183 }
184 }
185
186 void KeyboardUIContent::UpdateInsetsForWindow(aura::Window* window) { 177 void KeyboardUIContent::UpdateInsetsForWindow(aura::Window* window) {
187 aura::Window* keyboard_container = 178 aura::Window* keyboard_container =
188 keyboard_controller()->GetContainerWindow(); 179 keyboard_controller()->GetContainerWindow();
189 if (!ShouldWindowOverscroll(window)) 180 if (!ShouldWindowOverscroll(window))
190 return; 181 return;
191 182
192 std::unique_ptr<content::RenderWidgetHostIterator> widgets( 183 std::unique_ptr<content::RenderWidgetHostIterator> widgets(
193 content::RenderWidgetHost::GetRenderWidgetHosts()); 184 content::RenderWidgetHost::GetRenderWidgetHosts());
194 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) { 185 while (content::RenderWidgetHost* widget = widgets->GetNextHost()) {
195 content::RenderWidgetHostView* view = widget->GetView(); 186 content::RenderWidgetHostView* view = widget->GetView();
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 shadow_.reset(new wm::Shadow()); 356 shadow_.reset(new wm::Shadow());
366 shadow_->Init(wm::ShadowElevation::LARGE); 357 shadow_->Init(wm::ShadowElevation::LARGE);
367 shadow_->layer()->SetVisible(true); 358 shadow_->layer()->SetVisible(true);
368 contents_window->parent()->layer()->Add(shadow_->layer()); 359 contents_window->parent()->layer()->Add(shadow_->layer());
369 } 360 }
370 361
371 shadow_->SetContentBounds(contents_window->bounds()); 362 shadow_->SetContentBounds(contents_window->bounds());
372 } 363 }
373 364
374 } // namespace keyboard 365 } // namespace keyboard
OLDNEW
« no previous file with comments | « ui/keyboard/content/keyboard_ui_content.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698