| OLD | NEW |
| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // Prints all the pages listed in |params|. | 109 // Prints all the pages listed in |params|. |
| 110 // It will implicitly revert the document to display CSS media type. | 110 // It will implicitly revert the document to display CSS media type. |
| 111 void PrintPages(const ViewMsg_PrintPages_Params& params, | 111 void PrintPages(const ViewMsg_PrintPages_Params& params, |
| 112 WebKit::WebFrame* frame); | 112 WebKit::WebFrame* frame); |
| 113 | 113 |
| 114 // IPC::Message::Sender | 114 // IPC::Message::Sender |
| 115 bool Send(IPC::Message* msg); | 115 bool Send(IPC::Message* msg); |
| 116 | 116 |
| 117 int32 routing_id(); | 117 int32 routing_id(); |
| 118 | 118 |
| 119 // WebViewDeletegate | 119 // WebKit::WebViewClient |
| 120 virtual WebView* createView(WebKit::WebFrame* creator) { return NULL; } |
| 121 virtual WebKit::WebWidget* createPopupMenu(bool activatable) { return NULL; } |
| 122 virtual WebKit::WebWidget* createPopupMenu( |
| 123 const WebKit::WebPopupMenuInfo& info) { return NULL; } |
| 124 virtual void didAddMessageToConsole( |
| 125 const WebKit::WebConsoleMessage& message, |
| 126 const WebKit::WebString& source_name, unsigned source_line) {} |
| 127 virtual void printPage(WebKit::WebFrame* frame) {} |
| 128 virtual void didStartLoading() {} |
| 129 virtual void didStopLoading(); |
| 130 virtual void runModalAlertDialog( |
| 131 WebKit::WebFrame* frame, const WebKit::WebString& message) {} |
| 132 virtual bool runModalConfirmDialog( |
| 133 WebKit::WebFrame* frame, const WebKit::WebString& message) { |
| 134 return false; |
| 135 } |
| 136 virtual bool runModalPromptDialog( |
| 137 WebKit::WebFrame* frame, const WebKit::WebString& message, |
| 138 const WebKit::WebString& default_value, |
| 139 WebKit::WebString* actual_value) { return false; } |
| 140 virtual bool runModalBeforeUnloadDialog( |
| 141 WebKit::WebFrame* frame, const WebKit::WebString& message) { |
| 142 return true; |
| 143 } |
| 144 virtual void setStatusText(const WebKit::WebString& text) {} |
| 145 virtual void setMouseOverURL(const WebKit::WebURL& url) {} |
| 146 virtual void setToolTipText( |
| 147 const WebKit::WebString& text, WebKit::WebTextDirection hint) {} |
| 148 virtual void startDragging( |
| 149 const WebKit::WebPoint& from, const WebKit::WebDragData& data, |
| 150 WebKit::WebDragOperationsMask mask) {} |
| 151 virtual void focusNext() {} |
| 152 virtual void focusPrevious() {} |
| 153 virtual void navigateBackForwardSoon(int offset) {} |
| 154 virtual int historyBackListCount() { return 0; } |
| 155 virtual int historyForwardListCount() { return 0; } |
| 156 virtual void didAddHistoryItem() {} |
| 157 |
| 158 // WebKit::WebWidgetClient |
| 120 virtual void didInvalidateRect(const WebKit::WebRect&) {} | 159 virtual void didInvalidateRect(const WebKit::WebRect&) {} |
| 121 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect) {} | 160 virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect) {} |
| 122 virtual void didFocus() {} | 161 virtual void didFocus() {} |
| 123 virtual void didBlur() {} | 162 virtual void didBlur() {} |
| 124 virtual void didChangeCursor(const WebKit::WebCursorInfo&) {} | 163 virtual void didChangeCursor(const WebKit::WebCursorInfo&) {} |
| 125 virtual void closeWidgetSoon() {} | 164 virtual void closeWidgetSoon() {} |
| 126 virtual void show(WebKit::WebNavigationPolicy) {} | 165 virtual void show(WebKit::WebNavigationPolicy) {} |
| 127 virtual void runModal() {} | 166 virtual void runModal() {} |
| 128 virtual WebKit::WebRect windowRect(); | 167 virtual WebKit::WebRect windowRect(); |
| 129 virtual void setWindowRect(const WebKit::WebRect&) {} | 168 virtual void setWindowRect(const WebKit::WebRect&) {} |
| 130 virtual WebKit::WebRect windowResizerRect(); | 169 virtual WebKit::WebRect windowResizerRect(); |
| 131 virtual WebKit::WebRect rootWindowRect(); | 170 virtual WebKit::WebRect rootWindowRect(); |
| 132 virtual WebKit::WebScreenInfo screenInfo(); | 171 virtual WebKit::WebScreenInfo screenInfo(); |
| 133 virtual void DidStopLoading(WebView* webview); | |
| 134 | 172 |
| 135 private: | 173 private: |
| 136 RenderView* render_view_; | 174 RenderView* render_view_; |
| 137 scoped_ptr<WebView> print_web_view_; | 175 scoped_ptr<WebView> print_web_view_; |
| 138 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; | 176 scoped_ptr<ViewMsg_PrintPages_Params> print_pages_params_; |
| 139 base::Time last_cancelled_script_print_; | 177 base::Time last_cancelled_script_print_; |
| 140 int user_cancelled_scripted_print_count_; | 178 int user_cancelled_scripted_print_count_; |
| 141 | 179 |
| 142 private: | 180 private: |
| 143 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 181 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 144 }; | 182 }; |
| 145 | 183 |
| 146 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 184 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |