OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 5 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 class WebLocalFrameBase; | 84 class WebLocalFrameBase; |
85 class WebRemoteFrameBase; | 85 class WebRemoteFrameBase; |
86 | 86 |
87 struct CompositedSelection; | 87 struct CompositedSelection; |
88 struct DateTimeChooserParameters; | 88 struct DateTimeChooserParameters; |
89 struct FrameLoadRequest; | 89 struct FrameLoadRequest; |
90 struct ViewportDescription; | 90 struct ViewportDescription; |
91 struct WebCursorInfo; | 91 struct WebCursorInfo; |
92 struct WebPoint; | 92 struct WebPoint; |
93 struct WebScreenInfo; | 93 struct WebScreenInfo; |
94 struct WindowFeatures; | 94 struct WebWindowFeatures; |
95 | 95 |
96 class CORE_EXPORT ChromeClient : public PlatformChromeClient { | 96 class CORE_EXPORT ChromeClient : public PlatformChromeClient { |
97 public: | 97 public: |
98 virtual void ChromeDestroyed() = 0; | 98 virtual void ChromeDestroyed() = 0; |
99 | 99 |
100 // The specified rectangle is adjusted for the minimum window size and the | 100 // The specified rectangle is adjusted for the minimum window size and the |
101 // screen, then setWindowRect with the adjusted rectangle is called. | 101 // screen, then setWindowRect with the adjusted rectangle is called. |
102 void SetWindowRectWithAdjustment(const IntRect&, LocalFrame&); | 102 void SetWindowRectWithAdjustment(const IntRect&, LocalFrame&); |
103 virtual IntRect RootWindowRect() = 0; | 103 virtual IntRect RootWindowRect() = 0; |
104 | 104 |
(...skipping 19 matching lines...) Expand all Loading... |
124 virtual bool AcceptsLoadDrops() const = 0; | 124 virtual bool AcceptsLoadDrops() const = 0; |
125 | 125 |
126 // The LocalFrame pointer provides the ChromeClient with context about which | 126 // The LocalFrame pointer provides the ChromeClient with context about which |
127 // LocalFrame wants to create the new Page. Also, the newly created window | 127 // LocalFrame wants to create the new Page. Also, the newly created window |
128 // should not be shown to the user until the ChromeClient of the newly | 128 // should not be shown to the user until the ChromeClient of the newly |
129 // created Page has its show method called. | 129 // created Page has its show method called. |
130 // The FrameLoadRequest parameter is only for ChromeClient to check if the | 130 // The FrameLoadRequest parameter is only for ChromeClient to check if the |
131 // request could be fulfilled. The ChromeClient should not load the request. | 131 // request could be fulfilled. The ChromeClient should not load the request. |
132 virtual Page* CreateWindow(LocalFrame*, | 132 virtual Page* CreateWindow(LocalFrame*, |
133 const FrameLoadRequest&, | 133 const FrameLoadRequest&, |
134 const WindowFeatures&, | 134 const WebWindowFeatures&, |
135 NavigationPolicy) = 0; | 135 NavigationPolicy) = 0; |
136 virtual void Show(NavigationPolicy = kNavigationPolicyIgnore) = 0; | 136 virtual void Show(NavigationPolicy) = 0; |
137 | |
138 void SetWindowFeatures(const WindowFeatures&); | |
139 | 137 |
140 // All the parameters should be in viewport space. That is, if an event | 138 // All the parameters should be in viewport space. That is, if an event |
141 // scrolls by 10 px, but due to a 2X page scale we apply a 5px scroll to the | 139 // scrolls by 10 px, but due to a 2X page scale we apply a 5px scroll to the |
142 // root frame, all of which is handled as overscroll, we should return 10px | 140 // root frame, all of which is handled as overscroll, we should return 10px |
143 // as the overscrollDelta. | 141 // as the overscrollDelta. |
144 virtual void DidOverscroll(const FloatSize& overscroll_delta, | 142 virtual void DidOverscroll(const FloatSize& overscroll_delta, |
145 const FloatSize& accumulated_overscroll, | 143 const FloatSize& accumulated_overscroll, |
146 const FloatPoint& position_in_viewport, | 144 const FloatPoint& position_in_viewport, |
147 const FloatSize& velocity_in_viewport) = 0; | 145 const FloatSize& velocity_in_viewport) = 0; |
148 | 146 |
149 virtual void SetToolbarsVisible(bool) = 0; | |
150 virtual bool ToolbarsVisible() = 0; | |
151 | |
152 virtual void SetStatusbarVisible(bool) = 0; | |
153 virtual bool StatusbarVisible() = 0; | |
154 | |
155 virtual void SetScrollbarsVisible(bool) = 0; | |
156 virtual bool ScrollbarsVisible() = 0; | |
157 | |
158 virtual void SetMenubarVisible(bool) = 0; | |
159 virtual bool MenubarVisible() = 0; | |
160 | |
161 virtual void SetResizable(bool) = 0; | |
162 | |
163 virtual bool ShouldReportDetailedMessageForSource(LocalFrame&, | 147 virtual bool ShouldReportDetailedMessageForSource(LocalFrame&, |
164 const String& source) = 0; | 148 const String& source) = 0; |
165 virtual void AddMessageToConsole(LocalFrame*, | 149 virtual void AddMessageToConsole(LocalFrame*, |
166 MessageSource, | 150 MessageSource, |
167 MessageLevel, | 151 MessageLevel, |
168 const String& message, | 152 const String& message, |
169 unsigned line_number, | 153 unsigned line_number, |
170 const String& source_id, | 154 const String& source_id, |
171 const String& stack_trace) = 0; | 155 const String& stack_trace) = 0; |
172 | 156 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 const CompositedSelection&) {} | 257 const CompositedSelection&) {} |
274 | 258 |
275 virtual void SetEventListenerProperties(LocalFrame*, | 259 virtual void SetEventListenerProperties(LocalFrame*, |
276 WebEventListenerClass, | 260 WebEventListenerClass, |
277 WebEventListenerProperties) = 0; | 261 WebEventListenerProperties) = 0; |
278 virtual WebEventListenerProperties EventListenerProperties( | 262 virtual WebEventListenerProperties EventListenerProperties( |
279 LocalFrame*, | 263 LocalFrame*, |
280 WebEventListenerClass) const = 0; | 264 WebEventListenerClass) const = 0; |
281 virtual void UpdateEventRectsForSubframeIfNecessary(LocalFrame*) = 0; | 265 virtual void UpdateEventRectsForSubframeIfNecessary(LocalFrame*) = 0; |
282 virtual void SetHasScrollEventHandlers(LocalFrame*, bool) = 0; | 266 virtual void SetHasScrollEventHandlers(LocalFrame*, bool) = 0; |
| 267 virtual const WebInputEvent* GetCurrentInputEvent() const { return nullptr; } |
283 | 268 |
284 virtual void SetTouchAction(LocalFrame*, TouchAction) = 0; | 269 virtual void SetTouchAction(LocalFrame*, TouchAction) = 0; |
285 | 270 |
286 // Checks if there is an opened popup, called by LayoutMenuList::showPopup(). | 271 // Checks if there is an opened popup, called by LayoutMenuList::showPopup(). |
287 virtual bool HasOpenedPopup() const = 0; | 272 virtual bool HasOpenedPopup() const = 0; |
288 virtual PopupMenu* OpenPopupMenu(LocalFrame&, HTMLSelectElement&) = 0; | 273 virtual PopupMenu* OpenPopupMenu(LocalFrame&, HTMLSelectElement&) = 0; |
289 virtual PagePopup* OpenPagePopup(PagePopupClient*) = 0; | 274 virtual PagePopup* OpenPagePopup(PagePopupClient*) = 0; |
290 virtual void ClosePagePopup(PagePopup*) = 0; | 275 virtual void ClosePagePopup(PagePopup*) = 0; |
291 virtual DOMWindow* PagePopupWindowForTesting() const = 0; | 276 virtual DOMWindow* PagePopupWindowForTesting() const = 0; |
292 | 277 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 WeakMember<Node> last_mouse_over_node_; | 383 WeakMember<Node> last_mouse_over_node_; |
399 LayoutPoint last_tool_tip_point_; | 384 LayoutPoint last_tool_tip_point_; |
400 String last_tool_tip_text_; | 385 String last_tool_tip_text_; |
401 | 386 |
402 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood); | 387 FRIEND_TEST_ALL_PREFIXES(ChromeClientTest, SetToolTipFlood); |
403 }; | 388 }; |
404 | 389 |
405 } // namespace blink | 390 } // namespace blink |
406 | 391 |
407 #endif // ChromeClient_h | 392 #endif // ChromeClient_h |
OLD | NEW |