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

Side by Side Diff: chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.cc

Issue 8633021: Don't reload the keyboard on clean exit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h" 5 #include "chrome/browser/ui/virtual_keyboard/virtual_keyboard_manager.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/extensions/extension_event_router.h" 9 #include "chrome/browser/extensions/extension_event_router.h"
10 #include "chrome/browser/extensions/extension_function_dispatcher.h" 10 #include "chrome/browser/extensions/extension_function_dispatcher.h"
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 bool KeyboardWidget::OnMessageReceived(const IPC::Message& message) { 341 bool KeyboardWidget::OnMessageReceived(const IPC::Message& message) {
342 bool handled = true; 342 bool handled = true;
343 IPC_BEGIN_MESSAGE_MAP(KeyboardWidget, message) 343 IPC_BEGIN_MESSAGE_MAP(KeyboardWidget, message)
344 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) 344 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
345 IPC_MESSAGE_UNHANDLED(handled = false) 345 IPC_MESSAGE_UNHANDLED(handled = false)
346 IPC_END_MESSAGE_MAP() 346 IPC_END_MESSAGE_MAP()
347 return handled; 347 return handled;
348 } 348 }
349 349
350 void KeyboardWidget::RenderViewGone(base::TerminationStatus status) { 350 void KeyboardWidget::RenderViewGone(base::TerminationStatus status) {
351 // Reload the keyboard if it crashes. 351 if (status != base::TERMINATION_STATUS_NORMAL_TERMINATION) {
352 dom_view_->LoadURL(keyboard_url_); 352 // Reload the keyboard if it crashes.
353 dom_view_->SchedulePaint(); 353 dom_view_->LoadURL(keyboard_url_);
354 dom_view_->SchedulePaint();
355 }
354 } 356 }
355 357
356 void KeyboardWidget::OnRequest(const ExtensionHostMsg_Request_Params& request) { 358 void KeyboardWidget::OnRequest(const ExtensionHostMsg_Request_Params& request) {
357 extension_dispatcher_.Dispatch(request, 359 extension_dispatcher_.Dispatch(request,
358 dom_view_->dom_contents()->tab_contents()->render_view_host()); 360 dom_view_->dom_contents()->tab_contents()->render_view_host());
359 } 361 }
360 362
361 void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type, 363 void KeyboardWidget::TextInputTypeChanged(ui::TextInputType type,
362 views::Widget *widget) { 364 views::Widget *widget) {
363 // Send onTextInputTypeChanged event to keyboard extension. 365 // Send onTextInputTypeChanged event to keyboard extension.
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 566
565 void VirtualKeyboardManager::OnDesktopBoundsChanged( 567 void VirtualKeyboardManager::OnDesktopBoundsChanged(
566 const gfx::Rect& prev_bounds) { 568 const gfx::Rect& prev_bounds) {
567 keyboard_->ResetBounds(); 569 keyboard_->ResetBounds();
568 } 570 }
569 571
570 // static 572 // static
571 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() { 573 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
572 return Singleton<VirtualKeyboardManager>::get(); 574 return Singleton<VirtualKeyboardManager>::get();
573 } 575 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698