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_scope.h" | 5 #include "win8/metro_driver/ime/input_scope.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/macros.h" |
11 #include "ui/base/win/atl_module.h" | 12 #include "ui/base/win/atl_module.h" |
12 | 13 |
13 namespace metro_driver { | 14 namespace metro_driver { |
14 namespace { | 15 namespace { |
15 | 16 |
16 // An implementation of ITfInputScope interface. | 17 // An implementation of ITfInputScope interface. |
17 // This implementation only covers ITfInputScope::GetInputScopes since built-in | 18 // This implementation only covers ITfInputScope::GetInputScopes since built-in |
18 // on-screen keyboard on Windows 8+ changes its layout depending on the returned | 19 // on-screen keyboard on Windows 8+ changes its layout depending on the returned |
19 // value of this method. | 20 // value of this method. |
20 // Although other advanced features of ITfInputScope such as phase list or | 21 // Although other advanced features of ITfInputScope such as phase list or |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 if (FAILED(hr)) { | 79 if (FAILED(hr)) { |
79 LOG(ERROR) << "CComObject<InputScopeImpl>::CreateInstance failed. hr = " | 80 LOG(ERROR) << "CComObject<InputScopeImpl>::CreateInstance failed. hr = " |
80 << hr; | 81 << hr; |
81 return base::win::ScopedComPtr<ITfInputScope>(); | 82 return base::win::ScopedComPtr<ITfInputScope>(); |
82 } | 83 } |
83 object->Initialize(input_scopes); | 84 object->Initialize(input_scopes); |
84 return base::win::ScopedComPtr<ITfInputScope>(object); | 85 return base::win::ScopedComPtr<ITfInputScope>(object); |
85 } | 86 } |
86 | 87 |
87 } // namespace metro_driver | 88 } // namespace metro_driver |
OLD | NEW |