Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: content/public/browser/render_widget_host_view.h

Issue 2370393002: Extracting placeholder information from Webkit to Blimp (Closed)
Patch Set: Addressed some comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback.h"
10 #include "base/strings/string16.h" 11 #include "base/strings/string16.h"
11 #include "build/build_config.h" 12 #include "build/build_config.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "third_party/WebKit/public/web/WebInputEvent.h" 14 #include "third_party/WebKit/public/web/WebInputEvent.h"
14 #include "third_party/skia/include/core/SkColor.h" 15 #include "third_party/skia/include/core/SkColor.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 17
17 class GURL; 18 class GURL;
18 19
19 namespace gfx { 20 namespace gfx {
20 class Point; 21 class Point;
21 class Rect; 22 class Rect;
22 class Size; 23 class Size;
23 } 24 }
24 25
25 namespace ui { 26 namespace ui {
26 class TextInputClient; 27 class TextInputClient;
27 class AcceleratedWidgetMac; 28 class AcceleratedWidgetMac;
28 } 29 }
29 30
30 namespace content { 31 namespace content {
31 32
32 class RenderWidgetHost; 33 class RenderWidgetHost;
33 class RenderWidgetHostViewFrameSubscriber; 34 class RenderWidgetHostViewFrameSubscriber;
35 struct FormFieldData;
36
37 using ExtractFormFieldDataCallback = base::Callback<void(const FormFieldData&)>;
Charlie Reis 2016/11/04 20:59:46 nit: Drop "Extract" from the name? Sounds kind of
shaktisahu 2016/11/11 01:15:03 Done. Now it's called FormFieldDataCallback.
34 38
35 // RenderWidgetHostView is an interface implemented by an object that acts as 39 // RenderWidgetHostView is an interface implemented by an object that acts as
36 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its 40 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its
37 // associated RenderProcessHost own the "Model" in this case which is the 41 // associated RenderProcessHost own the "Model" in this case which is the
38 // child renderer process. The View is responsible for receiving events from 42 // child renderer process. The View is responsible for receiving events from
39 // the surrounding environment and passing them to the RenderWidgetHost, and 43 // the surrounding environment and passing them to the RenderWidgetHost, and
40 // for actually displaying the content of the RenderWidgetHost when it 44 // for actually displaying the content of the RenderWidgetHost when it
41 // changes. 45 // changes.
42 // 46 //
43 // RenderWidgetHostView Class Hierarchy: 47 // RenderWidgetHostView Class Hierarchy:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual gfx::NativeView GetNativeView() const = 0; 88 virtual gfx::NativeView GetNativeView() const = 0;
85 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0; 89 virtual gfx::NativeViewAccessible GetNativeViewAccessible() = 0;
86 90
87 // Returns a ui::TextInputClient to support text input or nullptr if this RWHV 91 // Returns a ui::TextInputClient to support text input or nullptr if this RWHV
88 // doesn't support text input. 92 // doesn't support text input.
89 // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for 93 // Note: Not all the platforms use ui::InputMethod and ui::TextInputClient for
90 // text input. Some platforms (Mac and Android for example) use their own 94 // text input. Some platforms (Mac and Android for example) use their own
91 // text input system. 95 // text input system.
92 virtual ui::TextInputClient* GetTextInputClient() = 0; 96 virtual ui::TextInputClient* GetTextInputClient() = 0;
93 97
98 // Retrieves the text input info associated with the current form field.
99 virtual void GetFocusedFormFieldData(ExtractFormFieldDataCallback& reply) = 0;
100
94 // Set focus to the associated View component. 101 // Set focus to the associated View component.
95 virtual void Focus() = 0; 102 virtual void Focus() = 0;
96 // Returns true if the View currently has the focus. 103 // Returns true if the View currently has the focus.
97 virtual bool HasFocus() const = 0; 104 virtual bool HasFocus() const = 0;
98 // Returns true is the current display surface is available. 105 // Returns true is the current display surface is available.
99 virtual bool IsSurfaceAvailableForCopy() const = 0; 106 virtual bool IsSurfaceAvailableForCopy() const = 0;
100 107
101 // Shows/hides the view. These must always be called together in pairs. 108 // Shows/hides the view. These must always be called together in pairs.
102 // It is not legal to call Hide() multiple times in a row. 109 // It is not legal to call Hide() multiple times in a row.
103 virtual void Show() = 0; 110 virtual void Show() = 0;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Returns |true| if text is currently being spoken by Mac OS X. 197 // Returns |true| if text is currently being spoken by Mac OS X.
191 virtual bool IsSpeaking() const = 0; 198 virtual bool IsSpeaking() const = 0;
192 // Stops speaking, if it is currently in progress. 199 // Stops speaking, if it is currently in progress.
193 virtual void StopSpeaking() = 0; 200 virtual void StopSpeaking() = 0;
194 #endif // defined(OS_MACOSX) 201 #endif // defined(OS_MACOSX)
195 }; 202 };
196 203
197 } // namespace content 204 } // namespace content
198 205
199 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 206 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698