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 "content/browser/renderer_host/text_input_client_message_filter.h" | 5 #include "content/browser/renderer_host/text_input_client_message_filter.h" |
6 | 6 |
7 #include "base/memory/scoped_nsobject.h" | 7 #include "base/mac/scoped_nsobject.h" |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "content/browser/renderer_host/render_view_host_impl.h" | 9 #include "content/browser/renderer_host/render_view_host_impl.h" |
10 #include "content/browser/renderer_host/text_input_client_mac.h" | 10 #include "content/browser/renderer_host/text_input_client_mac.h" |
11 #include "content/common/text_input_client_messages.h" | 11 #include "content/common/text_input_client_messages.h" |
12 #include "content/public/browser/render_widget_host_view.h" | 12 #include "content/public/browser/render_widget_host_view.h" |
13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
14 #include "ui/base/range/range.h" | 14 #include "ui/base/range/range.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const mac::AttributedStringCoder::EncodedString& encoded_string) { | 60 const mac::AttributedStringCoder::EncodedString& encoded_string) { |
61 TextInputClientMac* service = TextInputClientMac::GetInstance(); | 61 TextInputClientMac* service = TextInputClientMac::GetInstance(); |
62 NSAttributedString* string = | 62 NSAttributedString* string = |
63 mac::AttributedStringCoder::Decode(&encoded_string); | 63 mac::AttributedStringCoder::Decode(&encoded_string); |
64 if (![string length]) | 64 if (![string length]) |
65 string = nil; | 65 string = nil; |
66 service->SetSubstringAndSignal(string); | 66 service->SetSubstringAndSignal(string); |
67 } | 67 } |
68 | 68 |
69 } // namespace content | 69 } // namespace content |
OLD | NEW |