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

Side by Side Diff: Source/core/page/ChromeClient.h

Issue 1149093010: Cleanup: Rename ChromeClient function names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/ChromeClient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 virtual bool scrollbarsVisible() = 0; 112 virtual bool scrollbarsVisible() = 0;
113 113
114 virtual void setMenubarVisible(bool) = 0; 114 virtual void setMenubarVisible(bool) = 0;
115 virtual bool menubarVisible() = 0; 115 virtual bool menubarVisible() = 0;
116 116
117 virtual void setResizable(bool) = 0; 117 virtual void setResizable(bool) = 0;
118 118
119 virtual bool shouldReportDetailedMessageForSource(LocalFrame&, const String& source) = 0; 119 virtual bool shouldReportDetailedMessageForSource(LocalFrame&, const String& source) = 0;
120 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c onst String& message, unsigned lineNumber, const String& sourceID, const String& stackTrace) = 0; 120 virtual void addMessageToConsole(LocalFrame*, MessageSource, MessageLevel, c onst String& message, unsigned lineNumber, const String& sourceID, const String& stackTrace) = 0;
121 121
122 virtual bool canRunBeforeUnloadConfirmPanel() = 0; 122 virtual bool canOpenBeforeUnloadConfirmPanel() = 0;
123 bool runBeforeUnloadConfirmPanel(const String& message, LocalFrame*); 123 bool openBeforeUnloadConfirmPanel(const String& message, LocalFrame*);
124 124
125 virtual void closeWindowSoon() = 0; 125 virtual void closeWindowSoon() = 0;
126 126
127 void runJavaScriptAlert(LocalFrame*, const String&); 127 void openJavaScriptAlert(LocalFrame*, const String&);
128 bool runJavaScriptConfirm(LocalFrame*, const String&); 128 bool openJavaScriptConfirm(LocalFrame*, const String&);
129 bool runJavaScriptPrompt(LocalFrame*, const String& message, const String& d efaultValue, String& result); 129 bool openJavaScriptPrompt(LocalFrame*, const String& message, const String& defaultValue, String& result);
130 virtual void setStatusbarText(const String&) = 0; 130 virtual void setStatusbarText(const String&) = 0;
131 virtual bool tabsToLinks() = 0; 131 virtual bool tabsToLinks() = 0;
132 132
133 virtual void* webView() const = 0; 133 virtual void* webView() const = 0;
134 134
135 virtual IntRect windowResizerRect() const = 0; 135 virtual IntRect windowResizerRect() const = 0;
136 136
137 // Methods used by HostWindow. 137 // Methods used by HostWindow.
138 virtual WebScreenInfo screenInfo() const = 0; 138 virtual WebScreenInfo screenInfo() const = 0;
139 virtual void setCursor(const Cursor&) = 0; 139 virtual void setCursor(const Cursor&) = 0;
140 // End methods used by HostWindow. 140 // End methods used by HostWindow.
141 virtual Cursor lastSetCursorForTesting() const = 0; 141 virtual Cursor lastSetCursorForTesting() const = 0;
142 142
143 virtual void scheduleAnimationForFrame(LocalFrame*) { } 143 virtual void scheduleAnimationForFrame(LocalFrame*) { }
144 144
145 virtual void dispatchViewportPropertiesDidChange(const ViewportDescription&) const { } 145 virtual void dispatchViewportPropertiesDidChange(const ViewportDescription&) const { }
146 146
147 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const = 0; 147 virtual void contentsSizeChanged(LocalFrame*, const IntSize&) const = 0;
148 virtual void pageScaleFactorChanged() const { } 148 virtual void pageScaleFactorChanged() const { }
149 virtual float clampPageScaleFactorToLimits(float scale) const { return scale ; } 149 virtual float clampPageScaleFactorToLimits(float scale) const { return scale ; }
150 virtual void layoutUpdated(LocalFrame*) const { } 150 virtual void layoutUpdated(LocalFrame*) const { }
151 151
152 void mouseDidMoveOverElement(const HitTestResult&); 152 void mouseDidMoveOverElement(const HitTestResult&);
153 virtual void setToolTip(const String&, TextDirection) = 0; 153 virtual void setToolTip(const String&, TextDirection) = 0;
154 154
155 void print(LocalFrame*); 155 void print(LocalFrame*);
156 156
157 virtual void annotatedRegionsChanged() = 0; 157 virtual void annotatedRegionsChanged() = 0;
158 158
159 virtual PassOwnPtrWillBeRawPtr<ColorChooser> createColorChooser(LocalFrame*, ColorChooserClient*, const Color&) = 0; 159 virtual PassOwnPtrWillBeRawPtr<ColorChooser> openColorChooser(LocalFrame*, C olorChooserClient*, const Color&) = 0;
160 160
161 // This function is used for: 161 // This function is used for:
162 // - Mandatory date/time choosers if !ENABLE(INPUT_MULTIPLE_FIELDS_UI) 162 // - Mandatory date/time choosers if !ENABLE(INPUT_MULTIPLE_FIELDS_UI)
163 // - Date/time choosers for types for which LayoutTheme::supportsCalendarPi cker 163 // - Date/time choosers for types for which LayoutTheme::supportsCalendarPi cker
164 // returns true, if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 164 // returns true, if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
165 // - <datalist> UI for date/time input types regardless of 165 // - <datalist> UI for date/time input types regardless of
166 // ENABLE(INPUT_MULTIPLE_FIELDS_UI) 166 // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
167 virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClien t*, const DateTimeChooserParameters&) = 0; 167 virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClien t*, const DateTimeChooserParameters&) = 0;
168 168
169 virtual void openTextDataListChooser(HTMLInputElement&)= 0; 169 virtual void openTextDataListChooser(HTMLInputElement&)= 0;
170 170
171 virtual void runOpenPanel(LocalFrame*, PassRefPtr<FileChooser>) = 0; 171 virtual void openFileChooser(LocalFrame*, PassRefPtr<FileChooser>) = 0;
172 172
173 // Asychronous request to enumerate all files in a directory chosen by the u ser. 173 // Asychronous request to enumerate all files in a directory chosen by the u ser.
174 virtual void enumerateChosenDirectory(FileChooser*) = 0; 174 virtual void enumerateChosenDirectory(FileChooser*) = 0;
175 175
176 // Allows ports to customize the type of graphics layers created by this pag e. 176 // Allows ports to customize the type of graphics layers created by this pag e.
177 virtual GraphicsLayerFactory* graphicsLayerFactory() const { return nullptr; } 177 virtual GraphicsLayerFactory* graphicsLayerFactory() const { return nullptr; }
178 178
179 // Pass 0 as the GraphicsLayer to detach the root layer. 179 // Pass 0 as the GraphicsLayer to detach the root layer.
180 // This sets the graphics layer for the LocalFrame's WebWidget, if it has 180 // This sets the graphics layer for the LocalFrame's WebWidget, if it has
181 // one. Otherwise it sets it for the WebViewImpl. 181 // one. Otherwise it sets it for the WebViewImpl.
182 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) = 0; 182 virtual void attachRootGraphicsLayer(GraphicsLayer*, LocalFrame* localRoot) = 0;
183 183
184 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) { } 184 virtual void attachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) { }
185 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) { } 185 virtual void detachCompositorAnimationTimeline(WebCompositorAnimationTimelin e*, LocalFrame* localRoot) { }
186 186
187 virtual void enterFullScreenForElement(Element*) { } 187 virtual void enterFullScreenForElement(Element*) { }
188 virtual void exitFullScreenForElement(Element*) { } 188 virtual void exitFullScreenForElement(Element*) { }
189 189
190 virtual void clearCompositedSelection() { } 190 virtual void clearCompositedSelection() { }
191 virtual void updateCompositedSelection(const CompositedSelection&) { } 191 virtual void updateCompositedSelection(const CompositedSelection&) { }
192 192
193 virtual void needTouchEvents(bool) = 0; 193 virtual void needTouchEvents(bool) = 0;
194 194
195 virtual void setTouchAction(TouchAction) = 0; 195 virtual void setTouchAction(TouchAction) = 0;
196 196
197 // Checks if there is an opened popup, called by LayoutMenuList::showPopup() . 197 // Checks if there is an opened popup, called by LayoutMenuList::showPopup() .
198 virtual bool hasOpenedPopup() const = 0; 198 virtual bool hasOpenedPopup() const = 0;
199 virtual PassRefPtrWillBeRawPtr<PopupMenu> createPopupMenu(LocalFrame&, Popup MenuClient*) = 0; 199 virtual PassRefPtrWillBeRawPtr<PopupMenu> openPopupMenu(LocalFrame&, PopupMe nuClient*) = 0;
200 virtual DOMWindow* pagePopupWindowForTesting() const = 0; 200 virtual DOMWindow* pagePopupWindowForTesting() const = 0;
201 201
202 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif ication) { } 202 virtual void postAccessibilityNotification(AXObject*, AXObjectCache::AXNotif ication) { }
203 virtual String acceptLanguages() = 0; 203 virtual String acceptLanguages() = 0;
204 204
205 enum DialogType { 205 enum DialogType {
206 AlertDialog = 0, 206 AlertDialog = 0,
207 ConfirmDialog = 1, 207 ConfirmDialog = 1,
208 PromptDialog = 2, 208 PromptDialog = 2,
209 HTMLDialog = 3 209 HTMLDialog = 3
210 }; 210 };
211 virtual bool shouldRunModalDialogDuringPageDismissal(const DialogType&, cons t String&, Document::PageDismissalType) const { return true; } 211 virtual bool shouldOpenModalDialogDuringPageDismissal(const DialogType&, con st String&, Document::PageDismissalType) const { return true; }
212 212
213 virtual bool isSVGImageChromeClient() const { return false; } 213 virtual bool isSVGImageChromeClient() const { return false; }
214 214
215 virtual bool requestPointerLock() { return false; } 215 virtual bool requestPointerLock() { return false; }
216 virtual void requestPointerUnlock() { } 216 virtual void requestPointerUnlock() { }
217 217
218 virtual IntSize minimumWindowSize() const { return IntSize(100, 100); } 218 virtual IntSize minimumWindowSize() const { return IntSize(100, 100); }
219 219
220 virtual bool isChromeClientImpl() const { return false; } 220 virtual bool isChromeClientImpl() const { return false; }
221 221
(...skipping 17 matching lines...) Expand all
239 virtual void didUpdateTopControls() const { } 239 virtual void didUpdateTopControls() const { }
240 240
241 virtual void registerPopupOpeningObserver(PopupOpeningObserver*) = 0; 241 virtual void registerPopupOpeningObserver(PopupOpeningObserver*) = 0;
242 virtual void unregisterPopupOpeningObserver(PopupOpeningObserver*) = 0; 242 virtual void unregisterPopupOpeningObserver(PopupOpeningObserver*) = 0;
243 243
244 protected: 244 protected:
245 virtual ~ChromeClient() { } 245 virtual ~ChromeClient() { }
246 246
247 virtual void showMouseOverURL(const HitTestResult&) = 0; 247 virtual void showMouseOverURL(const HitTestResult&) = 0;
248 virtual void setWindowRect(const IntRect&) = 0; 248 virtual void setWindowRect(const IntRect&) = 0;
249 // TODO(tkent): Adding 'Internal' to virtual functions is not good. We 249 virtual bool openBeforeUnloadConfirmPanelDelegate(LocalFrame*, const String& message) = 0;
250 // should give better names, or move out non-internal versions of these 250 virtual void openJavaScriptAlertDelegate(LocalFrame*, const String&) = 0;
251 // functions. 251 virtual bool openJavaScriptConfirmDelegate(LocalFrame*, const String&) = 0;
252 virtual bool runBeforeUnloadConfirmPanelInternal(LocalFrame*, const String& message) = 0; 252 virtual bool openJavaScriptPromptDelegate(LocalFrame*, const String& message , const String& defaultValue, String& result) = 0;
253 virtual void runJavaScriptAlertInternal(LocalFrame*, const String&) = 0; 253 virtual void printDelegate(LocalFrame*) = 0;
254 virtual bool runJavaScriptConfirmInternal(LocalFrame*, const String&) = 0;
255 virtual bool runJavaScriptPromptInternal(LocalFrame*, const String& message, const String& defaultValue, String& result) = 0;
256 virtual void printInternal(LocalFrame*) = 0;
257 254
258 private: 255 private:
259 bool canRunModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const St ring& message); 256 bool canOpenModalIfDuringPageDismissal(Frame* mainFrame, DialogType, const S tring& message);
260 void setToolTip(const HitTestResult&); 257 void setToolTip(const HitTestResult&);
261 }; 258 };
262 259
263 } // namespace blink 260 } // namespace blink
264 261
265 #endif // ChromeClient_h 262 #endif // ChromeClient_h
OLDNEW
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/page/ChromeClient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698