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

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

Issue 9590002: JSONWriter cleanup: integrate pretty print into write options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflict 7. Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 break; 390 break;
391 } 391 }
392 default: { 392 default: {
393 NOTREACHED(); 393 NOTREACHED();
394 args.Append(Value::CreateStringValue("none")); 394 args.Append(Value::CreateStringValue("none"));
395 break; 395 break;
396 } 396 }
397 } 397 }
398 398
399 std::string json_args; 399 std::string json_args;
400 base::JSONWriter::Write(&args, false, &json_args); 400 base::JSONWriter::Write(&args, &json_args);
401 401
402 Profile* profile = 402 Profile* profile =
403 Profile::FromBrowserContext( 403 Profile::FromBrowserContext(
404 dom_view_->dom_contents()->web_contents()->GetBrowserContext()); 404 dom_view_->dom_contents()->web_contents()->GetBrowserContext());
405 profile->GetExtensionEventRouter()->DispatchEventToRenderers( 405 profile->GetExtensionEventRouter()->DispatchEventToRenderers(
406 kOnTextInputTypeChanged, json_args, NULL, GURL()); 406 kOnTextInputTypeChanged, json_args, NULL, GURL());
407 407
408 if (type == ui::TEXT_INPUT_TYPE_NONE) 408 if (type == ui::TEXT_INPUT_TYPE_NONE)
409 Hide(); 409 Hide();
410 else 410 else
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 529
530 void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) { 530 void VirtualKeyboardManager::OnWidgetClosing(views::Widget* widget) {
531 DCHECK_EQ(keyboard_, widget); 531 DCHECK_EQ(keyboard_, widget);
532 keyboard_ = NULL; 532 keyboard_ = NULL;
533 } 533 }
534 534
535 // static 535 // static
536 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() { 536 VirtualKeyboardManager* VirtualKeyboardManager::GetInstance() {
537 return Singleton<VirtualKeyboardManager>::get(); 537 return Singleton<VirtualKeyboardManager>::get();
538 } 538 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_manager_browsertest.cc ('k') | chrome/browser/ui/webui/about_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698