| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "base/gfx/rect.h" | 13 #include "base/gfx/rect.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "chrome/common/native_web_keyboard_event.h" | 15 #include "chrome/common/native_web_keyboard_event.h" |
| 16 #include "chrome/common/renderer_preferences.h" | 16 #include "chrome/common/renderer_preferences.h" |
| 17 #include "net/base/load_states.h" | 17 #include "net/base/load_states.h" |
| 18 #include "webkit/glue/password_form.h" | 18 #include "webkit/glue/password_form.h" |
| 19 #include "webkit/glue/webpreferences.h" | 19 #include "webkit/glue/webpreferences.h" |
| 20 #include "webkit/glue/window_open_disposition.h" | 20 #include "webkit/glue/window_open_disposition.h" |
| 21 | 21 |
| 22 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 22 class AutofillForm; |
| 23 | |
| 24 class ExtensionFunctionDispatcher; | |
| 25 class NavigationEntry; | 23 class NavigationEntry; |
| 26 class Profile; | 24 class Profile; |
| 27 class RenderProcessHost; | 25 class RenderProcessHost; |
| 28 class RenderViewHost; | 26 class RenderViewHost; |
| 29 class SkBitmap; | 27 class SkBitmap; |
| 30 class TabContents; | 28 class TabContents; |
| 31 class WebKeyboardEvent; | 29 class WebKeyboardEvent; |
| 32 struct ThumbnailScore; | 30 struct ThumbnailScore; |
| 33 struct ContextMenuParams; | 31 struct ContextMenuParams; |
| 34 struct ViewHostMsg_DidPrintPage_Params; | 32 struct ViewHostMsg_DidPrintPage_Params; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 int32 status) = 0; | 152 int32 status) = 0; |
| 155 }; | 153 }; |
| 156 | 154 |
| 157 // Returns the current delegate associated with a feature. May be NULL. | 155 // Returns the current delegate associated with a feature. May be NULL. |
| 158 virtual View* GetViewDelegate() const { return NULL; } | 156 virtual View* GetViewDelegate() const { return NULL; } |
| 159 virtual Save* GetSaveDelegate() const { return NULL; } | 157 virtual Save* GetSaveDelegate() const { return NULL; } |
| 160 | 158 |
| 161 // Gets the URL that is currently being displayed, if there is one. | 159 // Gets the URL that is currently being displayed, if there is one. |
| 162 virtual const GURL& GetURL() const = 0; | 160 virtual const GURL& GetURL() const = 0; |
| 163 | 161 |
| 164 // Create a new browser window to be sized, shown and contents managed | |
| 165 // by the caller. | |
| 166 virtual ExtensionFunctionDispatcher *CreateExtensionFunctionDispatcher( | |
| 167 RenderViewHost* render_view_host, | |
| 168 const std::string& extension_id) { | |
| 169 return NULL; | |
| 170 } | |
| 171 | |
| 172 // Return this object cast to a TabContents, if it is one. | 162 // Return this object cast to a TabContents, if it is one. |
| 173 virtual TabContents* GetAsTabContents() { return NULL; } | 163 virtual TabContents* GetAsTabContents() { return NULL; } |
| 174 | 164 |
| 175 // The RenderView is being constructed (message sent to the renderer process | 165 // The RenderView is being constructed (message sent to the renderer process |
| 176 // to construct a RenderView). Now is a good time to send other setup events | 166 // to construct a RenderView). Now is a good time to send other setup events |
| 177 // to the RenderView. This precedes any other commands to the RenderView. | 167 // to the RenderView. This precedes any other commands to the RenderView. |
| 178 virtual void RenderViewCreated(RenderViewHost* render_view_host) { } | 168 virtual void RenderViewCreated(RenderViewHost* render_view_host) { } |
| 179 | 169 |
| 180 // The RenderView has been constructed. | 170 // The RenderView has been constructed. |
| 181 virtual void RenderViewReady(RenderViewHost* render_view_host) { } | 171 virtual void RenderViewReady(RenderViewHost* render_view_host) { } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 WindowOpenDisposition disposition) { } | 261 WindowOpenDisposition disposition) { } |
| 272 | 262 |
| 273 // A DOM automation operation completed. The result of the operation is | 263 // A DOM automation operation completed. The result of the operation is |
| 274 // expressed in a json string. | 264 // expressed in a json string. |
| 275 virtual void DomOperationResponse(const std::string& json_string, | 265 virtual void DomOperationResponse(const std::string& json_string, |
| 276 int automation_id) { } | 266 int automation_id) { } |
| 277 | 267 |
| 278 // A message was sent from HTML-based UI. | 268 // A message was sent from HTML-based UI. |
| 279 // By default we ignore such messages. | 269 // By default we ignore such messages. |
| 280 virtual void ProcessDOMUIMessage(const std::string& message, | 270 virtual void ProcessDOMUIMessage(const std::string& message, |
| 281 const std::string& content) { } | 271 const std::string& content, |
| 272 int request_id, |
| 273 bool has_callback) { } |
| 282 | 274 |
| 283 // A message for external host. By default we ignore such messages. | 275 // A message for external host. By default we ignore such messages. |
| 284 // |receiver| can be a receiving script and |message| is any | 276 // |receiver| can be a receiving script and |message| is any |
| 285 // arbitrary string that makes sense to the receiver. | 277 // arbitrary string that makes sense to the receiver. |
| 286 virtual void ProcessExternalHostMessage(const std::string& message, | 278 virtual void ProcessExternalHostMessage(const std::string& message, |
| 287 const std::string& origin, | 279 const std::string& origin, |
| 288 const std::string& target) { | 280 const std::string& target) { |
| 289 } | 281 } |
| 290 | 282 |
| 291 // A document has been loaded in a frame. | 283 // A document has been loaded in a frame. |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 int number_of_matches, | 441 int number_of_matches, |
| 450 const gfx::Rect& selection_rect, | 442 const gfx::Rect& selection_rect, |
| 451 int active_match_ordinal, | 443 int active_match_ordinal, |
| 452 bool final_update) { } | 444 bool final_update) { } |
| 453 | 445 |
| 454 // The RenderView has inserted one css file into page. | 446 // The RenderView has inserted one css file into page. |
| 455 virtual void DidInsertCSS() { } | 447 virtual void DidInsertCSS() { } |
| 456 }; | 448 }; |
| 457 | 449 |
| 458 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 450 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |