| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "win8/metro_driver/ime/input_source.h" | 5 #include "win8/metro_driver/ime/input_source.h" |
| 6 | 6 |
| 7 #include <atlbase.h> | 7 #include <atlbase.h> |
| 8 #include <atlcom.h> | 8 #include <atlcom.h> |
| 9 #include <msctf.h> | 9 #include <msctf.h> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 observer_list_.RemoveObserver(observer); | 119 observer_list_.RemoveObserver(observer); |
| 120 } | 120 } |
| 121 void OnLanguageChanged() { | 121 void OnLanguageChanged() { |
| 122 FOR_EACH_OBSERVER(InputSourceObserver, | 122 FOR_EACH_OBSERVER(InputSourceObserver, |
| 123 observer_list_, | 123 observer_list_, |
| 124 OnInputSourceChanged()); | 124 OnInputSourceChanged()); |
| 125 } | 125 } |
| 126 | 126 |
| 127 base::win::ScopedComPtr<ITfInputProcessorProfileMgr> profile_manager_; | 127 base::win::ScopedComPtr<ITfInputProcessorProfileMgr> profile_manager_; |
| 128 scoped_refptr<InputSourceMonitor> monitor_; | 128 scoped_refptr<InputSourceMonitor> monitor_; |
| 129 ObserverList<InputSourceObserver> observer_list_; | 129 base::ObserverList<InputSourceObserver> observer_list_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(InputSourceImpl); | 131 DISALLOW_COPY_AND_ASSIGN(InputSourceImpl); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace | 134 } // namespace |
| 135 | 135 |
| 136 // static | 136 // static |
| 137 scoped_ptr<InputSource> InputSource::Create() { | 137 scoped_ptr<InputSource> InputSource::Create() { |
| 138 ui::win::CreateATLModuleIfNeeded(); | 138 ui::win::CreateATLModuleIfNeeded(); |
| 139 | 139 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 162 LOG(ERROR) << "Failed to initialize the monitor."; | 162 LOG(ERROR) << "Failed to initialize the monitor."; |
| 163 return scoped_ptr<InputSource>(); | 163 return scoped_ptr<InputSource>(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 // Transfer the ownership. | 166 // Transfer the ownership. |
| 167 return scoped_ptr<InputSource>( | 167 return scoped_ptr<InputSource>( |
| 168 new InputSourceImpl(profile_manager.get(), monitor)); | 168 new InputSourceImpl(profile_manager.get(), monitor)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 } // namespace metro_driver | 171 } // namespace metro_driver |
| OLD | NEW |