OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/text_input_client_observer.h" | 5 #include "content/renderer/text_input_client_observer.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "content/common/text_input_client_messages.h" | 8 #include "content/common/text_input_client_messages.h" |
9 #include "content/renderer/render_view_impl.h" | 9 #include "content/renderer/render_view_impl.h" |
10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.
h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.
h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
18 | 18 |
19 TextInputClientObserver::TextInputClientObserver(RenderViewImpl* render_view) | 19 TextInputClientObserver::TextInputClientObserver(RenderViewImpl* render_view) |
20 : content::RenderViewObserver(render_view) { | 20 : content::RenderViewObserver(render_view) { |
21 } | 21 } |
22 | 22 |
23 TextInputClientObserver::~TextInputClientObserver() { | 23 TextInputClientObserver::~TextInputClientObserver() { |
24 } | 24 } |
25 | 25 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 WebKit::WebSubstringUtil::attributedSubstringInRange( | 61 WebKit::WebSubstringUtil::attributedSubstringInRange( |
62 webview()->focusedFrame(), range.start(), range.length()); | 62 webview()->focusedFrame(), range.start(), range.length()); |
63 scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded( | 63 scoped_ptr<const mac::AttributedStringCoder::EncodedString> encoded( |
64 mac::AttributedStringCoder::Encode(string)); | 64 mac::AttributedStringCoder::Encode(string)); |
65 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(), | 65 Send(new TextInputClientReplyMsg_GotStringForRange(routing_id(), |
66 *encoded.get())); | 66 *encoded.get())); |
67 #else | 67 #else |
68 NOTIMPLEMENTED(); | 68 NOTIMPLEMENTED(); |
69 #endif | 69 #endif |
70 } | 70 } |
OLD | NEW |