| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple, Inc. All rights
reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012 Samsung Electronics. All rights reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 virtual float clampPageScaleFactorToLimits(float scale) const { return scale
; } | 148 virtual float clampPageScaleFactorToLimits(float scale) const { return scale
; } |
| 149 virtual void layoutUpdated(LocalFrame*) const { } | 149 virtual void layoutUpdated(LocalFrame*) const { } |
| 150 | 150 |
| 151 void mouseDidMoveOverElement(const HitTestResult&); | 151 void mouseDidMoveOverElement(const HitTestResult&); |
| 152 virtual void setToolTip(const String&, TextDirection) = 0; | 152 virtual void setToolTip(const String&, TextDirection) = 0; |
| 153 | 153 |
| 154 void print(LocalFrame*); | 154 void print(LocalFrame*); |
| 155 | 155 |
| 156 virtual void annotatedRegionsChanged() = 0; | 156 virtual void annotatedRegionsChanged() = 0; |
| 157 | 157 |
| 158 PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*, ColorCh
ooserClient*, const Color&); | 158 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*,
ColorChooserClient*, const Color&) = 0; |
| 159 | 159 |
| 160 // This function is used for: | 160 // This function is used for: |
| 161 // - Mandatory date/time choosers if !ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 161 // - Mandatory date/time choosers if !ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 162 // - Date/time choosers for types for which LayoutTheme::supportsCalendarPi
cker | 162 // - Date/time choosers for types for which LayoutTheme::supportsCalendarPi
cker |
| 163 // returns true, if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 163 // returns true, if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 164 // - <datalist> UI for date/time input types regardless of | 164 // - <datalist> UI for date/time input types regardless of |
| 165 // ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 165 // ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 166 PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, cons
t DateTimeChooserParameters&); | 166 virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClien
t*, const DateTimeChooserParameters&) = 0; |
| 167 | 167 |
| 168 void openTextDataListChooser(HTMLInputElement&); | 168 virtual void openTextDataListChooser(HTMLInputElement&)= 0; |
| 169 | 169 |
| 170 void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>); | 170 virtual void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) = 0; |
| 171 | 171 |
| 172 // Asychronous request to enumerate all files in a directory chosen by the u
ser. | 172 // Asychronous request to enumerate all files in a directory chosen by the u
ser. |
| 173 virtual void enumerateChosenDirectory(FileChooser*) = 0; | 173 virtual void enumerateChosenDirectory(FileChooser*) = 0; |
| 174 | 174 |
| 175 // Allows ports to customize the type of graphics layers created by this pag
e. | 175 // Allows ports to customize the type of graphics layers created by this pag
e. |
| 176 virtual GraphicsLayerFactory* graphicsLayerFactory() const { return nullptr;
} | 176 virtual GraphicsLayerFactory* graphicsLayerFactory() const { return nullptr;
} |
| 177 | 177 |
| 178 // Pass 0 as the GraphicsLayer to detach the root layer. | 178 // Pass 0 as the GraphicsLayer to detach the root layer. |
| 179 // This sets the graphics layer for the LocalFrame's WebWidget, if it has on
e. Otherwise | 179 // This sets the graphics layer for the LocalFrame's WebWidget, if it has on
e. Otherwise |
| 180 // it sets it for the WebViewImpl. | 180 // it sets it for the WebViewImpl. |
| 181 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot)
= 0; | 181 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot)
= 0; |
| 182 | 182 |
| 183 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin
e*, LocalFrame* localRoot) { } | 183 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin
e*, LocalFrame* localRoot) { } |
| 184 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin
e*, LocalFrame* localRoot) { } | 184 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin
e*, LocalFrame* localRoot) { } |
| 185 | 185 |
| 186 virtual void enterFullScreenForElement(Element*) { } | 186 virtual void enterFullScreenForElement(Element*) { } |
| 187 virtual void exitFullScreenForElement(Element*) { } | 187 virtual void exitFullScreenForElement(Element*) { } |
| 188 | 188 |
| 189 virtual void clearCompositedSelection() { } | 189 virtual void clearCompositedSelection() { } |
| 190 virtual void updateCompositedSelection(const CompositedSelection&) { } | 190 virtual void updateCompositedSelection(const CompositedSelection&) { } |
| 191 | 191 |
| 192 virtual void needTouchEvents(bool) = 0; | 192 virtual void needTouchEvents(bool) = 0; |
| 193 | 193 |
| 194 virtual void setTouchAction(TouchAction) = 0; | 194 virtual void setTouchAction(TouchAction) = 0; |
| 195 | 195 |
| 196 // Checks if there is an opened popup, called by LayoutMenuList::showPopup()
. | 196 // Checks if there is an opened popup, called by LayoutMenuList::showPopup()
. |
| 197 virtual bool hasOpenedPopup() const = 0; | 197 virtual bool hasOpenedPopup() const = 0; |
| 198 PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, PopupMenuClie
nt*); | 198 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, Popup
MenuClient*) = 0; |
| 199 virtual DOMWindow* pagePopupWindowForTesting() const = 0; | 199 virtual DOMWindow* pagePopupWindowForTesting() const = 0; |
| 200 | 200 |
| 201 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif
ication) { } | 201 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif
ication) { } |
| 202 virtual String acceptLanguages() = 0; | 202 virtual String acceptLanguages() = 0; |
| 203 | 203 |
| 204 enum DialogType { | 204 enum DialogType { |
| 205 AlertDialog = 0, | 205 AlertDialog = 0, |
| 206 ConfirmDialog = 1, | 206 ConfirmDialog = 1, |
| 207 PromptDialog = 2, | 207 PromptDialog = 2, |
| 208 HTMLDialog = 3 | 208 HTMLDialog = 3 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 230 virtual void willSetInputMethodState() { } | 230 virtual void willSetInputMethodState() { } |
| 231 virtual void didUpdateTextOfFocusedElementByNonUserInput() { } | 231 virtual void didUpdateTextOfFocusedElementByNonUserInput() { } |
| 232 virtual void showImeIfNeeded() { } | 232 virtual void showImeIfNeeded() { } |
| 233 | 233 |
| 234 virtual void registerViewportLayers() const { } | 234 virtual void registerViewportLayers() const { } |
| 235 | 235 |
| 236 virtual void showUnhandledTapUIIfNeeded(IntPoint, Node*, bool) { } | 236 virtual void showUnhandledTapUIIfNeeded(IntPoint, Node*, bool) { } |
| 237 | 237 |
| 238 virtual void didUpdateTopControls() const { } | 238 virtual void didUpdateTopControls() const { } |
| 239 | 239 |
| 240 void registerPopupOpeningObserver(PopupOpeningObserver*); | 240 virtual void registerPopupOpeningObserver(PopupOpeningObserver*) = 0; |
| 241 void unregisterPopupOpeningObserver(PopupOpeningObserver*); | 241 virtual void unregisterPopupOpeningObserver(PopupOpeningObserver*) = 0; |
| 242 void notifyPopupOpeningObservers() const; | |
| 243 | 242 |
| 244 protected: | 243 protected: |
| 245 virtual ~ChromeClient() { } | 244 virtual ~ChromeClient() { } |
| 246 | 245 |
| 247 virtual void showMouseOverURL(const HitTestResult&) = 0; | 246 virtual void showMouseOverURL(const HitTestResult&) = 0; |
| 248 // TODO(tkent): Adding 'Internal' to virtual functions is not good. We | 247 // TODO(tkent): Adding 'Internal' to virtual functions is not good. We |
| 249 // should give better names, or move out non-internal versions of these | 248 // should give better names, or move out non-internal versions of these |
| 250 // functions. | 249 // functions. |
| 251 virtual void setWindowRectInternal(const IntRect&) = 0; | 250 virtual void setWindowRectInternal(const IntRect&) = 0; |
| 252 virtual bool runBeforeUnloadConfirmPanelInternal(LocalFrame*, const String&
message) = 0; | 251 virtual bool runBeforeUnloadConfirmPanelInternal(LocalFrame*, const String&
message) = 0; |
| 253 virtual void runJavaScriptAlertInternal(LocalFrame*, const String&) = 0; | 252 virtual void runJavaScriptAlertInternal(LocalFrame*, const String&) = 0; |
| 254 virtual bool runJavaScriptConfirmInternal(LocalFrame*, const String&) = 0; | 253 virtual bool runJavaScriptConfirmInternal(LocalFrame*, const String&) = 0; |
| 255 virtual bool runJavaScriptPromptInternal(LocalFrame*, const String& message,
const String& defaultValue, String& result) = 0; | 254 virtual bool runJavaScriptPromptInternal(LocalFrame*, const String& message,
const String& defaultValue, String& result) = 0; |
| 256 virtual void printInternal(LocalFrame*) = 0; | 255 virtual void printInternal(LocalFrame*) = 0; |
| 257 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooserInternal(Loca
lFrame*, ColorChooserClient*, const Color&) = 0; | |
| 258 virtual PassRefPtr<DateTimeChooser> openDateTimeChooserInternal(DateTimeChoo
serClient*, const DateTimeChooserParameters&) = 0; | |
| 259 virtual void openTextDataListChooserInternal(HTMLInputElement&) = 0; | |
| 260 virtual void runOpenPanelInternal(LocalFrame*, PassRefPtr<FileChooser>) = 0; | |
| 261 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenuInternal(LocalFrame
&, PopupMenuClient*) = 0; | |
| 262 virtual void setCursorInternal(const Cursor&) = 0; | 256 virtual void setCursorInternal(const Cursor&) = 0; |
| 263 | 257 |
| 264 private: | 258 private: |
| 265 bool canRunModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const St
ring& message); | 259 bool canRunModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const St
ring& message); |
| 266 void setToolTip(const HitTestResult&); | 260 void setToolTip(const HitTestResult&); |
| 267 | 261 |
| 268 Vector<PopupOpeningObserver*> m_popupOpeningObservers; | |
| 269 Cursor m_lastSetMouseCursorForTesting; | 262 Cursor m_lastSetMouseCursorForTesting; |
| 270 }; | 263 }; |
| 271 | 264 |
| 272 } // namespace blink | 265 } // namespace blink |
| 273 | 266 |
| 274 #endif // ChromeClient_h | 267 #endif // ChromeClient_h |
| OLD | NEW |