| OLD | NEW |
| 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/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/memory/ptr_util.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/common/extensions/api/input_ime.h" | 10 #include "chrome/common/extensions/api/input_ime.h" |
| 10 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
| 11 #include "content/public/browser/notification_service.h" | 12 #include "content/public/browser/notification_service.h" |
| 12 #include "extensions/browser/extension_registry.h" | 13 #include "extensions/browser/extension_registry.h" |
| 13 | 14 |
| 14 namespace input_ime = extensions::api::input_ime; | 15 namespace input_ime = extensions::api::input_ime; |
| 15 namespace KeyEventHandled = extensions::api::input_ime::KeyEventHandled; | 16 namespace KeyEventHandled = extensions::api::input_ime::KeyEventHandled; |
| 16 namespace SetComposition = extensions::api::input_ime::SetComposition; | 17 namespace SetComposition = extensions::api::input_ime::SetComposition; |
| 17 namespace CommitText = extensions::api::input_ime::CommitText; | 18 namespace CommitText = extensions::api::input_ime::CommitText; |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 InputImeEventRouter* GetInputImeEventRouter(Profile* profile) { | 418 InputImeEventRouter* GetInputImeEventRouter(Profile* profile) { |
| 418 if (!profile) | 419 if (!profile) |
| 419 return nullptr; | 420 return nullptr; |
| 420 if (profile->HasOffTheRecordProfile()) | 421 if (profile->HasOffTheRecordProfile()) |
| 421 profile = profile->GetOffTheRecordProfile(); | 422 profile = profile->GetOffTheRecordProfile(); |
| 422 return extensions::InputImeEventRouterFactory::GetInstance()->GetRouter( | 423 return extensions::InputImeEventRouterFactory::GetInstance()->GetRouter( |
| 423 profile); | 424 profile); |
| 424 } | 425 } |
| 425 | 426 |
| 426 } // namespace extensions | 427 } // namespace extensions |
| OLD | NEW |