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

Side by Side Diff: chrome/renderer/print_web_view_helper.h

Issue 346042: Add default implementations for WebViewClient and WebWidgetClient... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gfx/size.h" 10 #include "base/gfx/size.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Prints all the pages listed in |params|. 107 // Prints all the pages listed in |params|.
108 // It will implicitly revert the document to display CSS media type. 108 // It will implicitly revert the document to display CSS media type.
109 void PrintPages(const ViewMsg_PrintPages_Params& params, 109 void PrintPages(const ViewMsg_PrintPages_Params& params,
110 WebKit::WebFrame* frame); 110 WebKit::WebFrame* frame);
111 111
112 // IPC::Message::Sender 112 // IPC::Message::Sender
113 bool Send(IPC::Message* msg); 113 bool Send(IPC::Message* msg);
114 114
115 int32 routing_id(); 115 int32 routing_id();
116 116
117 // WebKit::WebViewClient 117 // WebKit::WebViewClient override:
118 virtual WebKit::WebView* createView(WebKit::WebFrame* creator) { return NULL; }
119 virtual WebKit::WebWidget* createPopupMenu(bool activatable) { return NULL; }
120 virtual WebKit::WebWidget* createPopupMenu(
121 const WebKit::WebPopupMenuInfo& info) { return NULL; }
122 virtual void didAddMessageToConsole(
123 const WebKit::WebConsoleMessage& message,
124 const WebKit::WebString& source_name, unsigned source_line) {}
125 virtual void printPage(WebKit::WebFrame* frame) {}
126 virtual WebKit::WebNotificationPresenter* notificationPresenter() {
127 return NULL;
128 }
129 virtual void didStartLoading() {}
130 virtual void didStopLoading(); 118 virtual void didStopLoading();
131 virtual bool shouldBeginEditing(const WebKit::WebRange& range) {
132 return false;
133 }
134 virtual bool shouldEndEditing(const WebKit::WebRange& range) {
135 return false;
136 }
137 virtual bool shouldInsertNode(
138 const WebKit::WebNode& node, const WebKit::WebRange& range,
139 WebKit::WebEditingAction action) { return false; }
140 virtual bool shouldInsertText(
141 const WebKit::WebString& text, const WebKit::WebRange& range,
142 WebKit::WebEditingAction action) { return false; }
143 virtual bool shouldChangeSelectedRange(
144 const WebKit::WebRange& from, const WebKit::WebRange& to,
145 WebKit::WebTextAffinity affinity, bool still_selecting) { return false; }
146 virtual bool shouldDeleteRange(const WebKit::WebRange& range) {
147 return false;
148 }
149 virtual bool shouldApplyStyle(
150 const WebKit::WebString& style, const WebKit::WebRange& range) {
151 return false;
152 }
153 virtual bool isSmartInsertDeleteEnabled() { return false; }
154 virtual bool isSelectTrailingWhitespaceEnabled() { return false; }
155 virtual void setInputMethodEnabled(bool enabled) {}
156 virtual void didBeginEditing() {}
157 virtual void didChangeSelection(bool is_selection_empty) {}
158 virtual void didChangeContents() {}
159 virtual void didExecuteCommand(const WebKit::WebString& command_name) {}
160 virtual void didEndEditing() {}
161 virtual bool handleCurrentKeyboardEvent() { return false; }
162 virtual void spellCheck(
163 const WebKit::WebString& text, int& offset, int& length) {}
164 virtual WebKit::WebString autoCorrectWord(
165 const WebKit::WebString& misspelled_word);
166 virtual void showSpellingUI(bool show) {}
167 virtual bool isShowingSpellingUI() { return false; }
168 virtual void updateSpellingUIWithMisspelledWord(
169 const WebKit::WebString& word) {}
170 virtual bool runFileChooser(
171 bool multi_select, const WebKit::WebString& title,
172 const WebKit::WebString& initial_value,
173 WebKit::WebFileChooserCompletion* chooser_completion) {
174 return false;
175 }
176 virtual void runModalAlertDialog(
177 WebKit::WebFrame* frame, const WebKit::WebString& message) {}
178 virtual bool runModalConfirmDialog(
179 WebKit::WebFrame* frame, const WebKit::WebString& message) {
180 return false;
181 }
182 virtual bool runModalPromptDialog(
183 WebKit::WebFrame* frame, const WebKit::WebString& message,
184 const WebKit::WebString& default_value,
185 WebKit::WebString* actual_value) { return false; }
186 virtual bool runModalBeforeUnloadDialog(
187 WebKit::WebFrame* frame, const WebKit::WebString& message) {
188 return true;
189 }
190 virtual void showContextMenu(
191 WebKit::WebFrame* frame, const WebKit::WebContextMenuData& data) {}
192 virtual void setStatusText(const WebKit::WebString& text) {}
193 virtual void setMouseOverURL(const WebKit::WebURL& url) {}
194 virtual void setKeyboardFocusURL(const WebKit::WebURL& url) {}
195 virtual void setToolTipText(
196 const WebKit::WebString& text, WebKit::WebTextDirection hint) {}
197 virtual void startDragging(
198 const WebKit::WebPoint& from, const WebKit::WebDragData& data,
199 WebKit::WebDragOperationsMask mask) {}
200 virtual bool acceptsLoadDrops() { return false; }
201 virtual void focusNext() {}
202 virtual void focusPrevious() {}
203 virtual void navigateBackForwardSoon(int offset) {}
204 virtual int historyBackListCount() { return 0; }
205 virtual int historyForwardListCount() { return 0; }
206 virtual void didAddHistoryItem() {}
207 virtual void focusAccessibilityObject(
208 const WebKit::WebAccessibilityObject& object) {}
209 virtual void didUpdateInspectorSettings() {}
210 virtual void queryAutofillSuggestions(
211 const WebKit::WebNode& node, const WebKit::WebString& name,
212 const WebKit::WebString& value) {}
213 virtual void removeAutofillSuggestions(
214 const WebKit::WebString& name, const WebKit::WebString& value) {}
215
216 // WebKit::WebWidgetClient
217 virtual void didInvalidateRect(const WebKit::WebRect&) {}
218 virtual void didScrollRect(
219 int dx, int dy, const WebKit::WebRect& clipRect) {}
220 virtual void didFocus() {}
221 virtual void didBlur() {}
222 virtual void didChangeCursor(const WebKit::WebCursorInfo&) {}
223 virtual void closeWidgetSoon() {}
224 virtual void show(WebKit::WebNavigationPolicy) {}
225 virtual void runModal() {}
226 virtual WebKit::WebRect windowRect();
227 virtual void setWindowRect(const WebKit::WebRect&) {}
228 virtual WebKit::WebRect windowResizerRect();
229 virtual WebKit::WebRect rootWindowRect();
230 virtual WebKit::WebScreenInfo screenInfo();
231 119
232 private: 120 private:
233 RenderView* render_view_; 121 RenderView* render_view_;
234 WebKit::WebView* print_web_view_; 122 WebKit::WebView* print_web_view_;
235 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; 123 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_;
236 base::Time last_cancelled_script_print_; 124 base::Time last_cancelled_script_print_;
237 int user_cancelled_scripted_print_count_; 125 int user_cancelled_scripted_print_count_;
238 126
239 private: 127 private:
240 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 128 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
241 }; 129 };
242 130
243 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 131 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698