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

Side by Side Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 140613002: Cleanup: Replace &LazyInstance::Get() with LazyInstance::Pointer(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/extensions/api/input_ime/input_ime_api.h" 5 #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chromeos/input_method/input_method_engine.h" 10 #include "chrome/browser/chromeos/input_method/input_method_engine.h"
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 } 769 }
770 770
771 InputImeAPI::~InputImeAPI() { 771 InputImeAPI::~InputImeAPI() {
772 } 772 }
773 773
774 static base::LazyInstance<ProfileKeyedAPIFactory<InputImeAPI> > 774 static base::LazyInstance<ProfileKeyedAPIFactory<InputImeAPI> >
775 g_factory = LAZY_INSTANCE_INITIALIZER; 775 g_factory = LAZY_INSTANCE_INITIALIZER;
776 776
777 // static 777 // static
778 ProfileKeyedAPIFactory<InputImeAPI>* InputImeAPI::GetFactoryInstance() { 778 ProfileKeyedAPIFactory<InputImeAPI>* InputImeAPI::GetFactoryInstance() {
779 return &g_factory.Get(); 779 return g_factory.Pointer();
780 } 780 }
781 781
782 void InputImeAPI::Observe(int type, 782 void InputImeAPI::Observe(int type,
783 const content::NotificationSource& source, 783 const content::NotificationSource& source,
784 const content::NotificationDetails& details) { 784 const content::NotificationDetails& details) {
785 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) { 785 if (type == chrome::NOTIFICATION_EXTENSION_LOADED) {
786 const Extension* extension = 786 const Extension* extension =
787 content::Details<const Extension>(details).ptr(); 787 content::Details<const Extension>(details).ptr();
788 const std::vector<InputComponentInfo>* input_components = 788 const std::vector<InputComponentInfo>* input_components =
789 extensions::InputComponents::GetInputComponents(extension); 789 extensions::InputComponents::GetInputComponents(extension);
(...skipping 17 matching lines...) Expand all
807 if (input_components->size() > 0) 807 if (input_components->size() > 0)
808 input_ime_event_router()->UnregisterAllImes(profile_, extension->id()); 808 input_ime_event_router()->UnregisterAllImes(profile_, extension->id());
809 } 809 }
810 } 810 }
811 811
812 InputImeEventRouter* InputImeAPI::input_ime_event_router() { 812 InputImeEventRouter* InputImeAPI::input_ime_event_router() {
813 return InputImeEventRouter::GetInstance(); 813 return InputImeEventRouter::GetInstance();
814 } 814 }
815 815
816 } // namespace extensions 816 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/input/input.cc ('k') | chrome/browser/extensions/api/location/location_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698