| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/process/kill.h" | 13 #include "base/process/kill.h" |
| 14 #include "base/strings/string16.h" | 14 #include "base/strings/string16.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "content/public/common/javascript_message_type.h" | |
| 17 #include "content/public/common/media_stream_request.h" | 16 #include "content/public/common/media_stream_request.h" |
| 18 #include "content/public/common/page_transition_types.h" | 17 #include "content/public/common/page_transition_types.h" |
| 19 #include "net/base/load_states.h" | 18 #include "net/base/load_states.h" |
| 20 #include "third_party/WebKit/public/web/WebPopupType.h" | 19 #include "third_party/WebKit/public/web/WebPopupType.h" |
| 21 #include "ui/base/window_open_disposition.h" | 20 #include "ui/base/window_open_disposition.h" |
| 22 | 21 |
| 23 class GURL; | 22 class GURL; |
| 24 class SkBitmap; | 23 class SkBitmap; |
| 25 class WebKeyboardEvent; | 24 class WebKeyboardEvent; |
| 26 struct ViewHostMsg_CreateWindow_Params; | 25 struct ViewHostMsg_CreateWindow_Params; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int32 page_id) {} | 159 int32 page_id) {} |
| 161 | 160 |
| 162 // The page wants to close the active view in this tab. | 161 // The page wants to close the active view in this tab. |
| 163 virtual void RouteCloseEvent(RenderViewHost* rvh) {} | 162 virtual void RouteCloseEvent(RenderViewHost* rvh) {} |
| 164 | 163 |
| 165 // The page wants to post a message to the active view in this tab. | 164 // The page wants to post a message to the active view in this tab. |
| 166 virtual void RouteMessageEvent( | 165 virtual void RouteMessageEvent( |
| 167 RenderViewHost* rvh, | 166 RenderViewHost* rvh, |
| 168 const ViewMsg_PostMessage_Params& params) {} | 167 const ViewMsg_PostMessage_Params& params) {} |
| 169 | 168 |
| 170 // A javascript message, confirmation or prompt should be shown. | |
| 171 virtual void RunJavaScriptMessage(RenderViewHost* rvh, | |
| 172 const base::string16& message, | |
| 173 const base::string16& default_prompt, | |
| 174 const GURL& frame_url, | |
| 175 JavaScriptMessageType type, | |
| 176 IPC::Message* reply_msg, | |
| 177 bool* did_suppress_message) {} | |
| 178 | |
| 179 virtual void RunBeforeUnloadConfirm(RenderViewHost* rvh, | |
| 180 const base::string16& message, | |
| 181 bool is_reload, | |
| 182 IPC::Message* reply_msg) {} | |
| 183 | |
| 184 // Return a dummy RendererPreferences object that will be used by the renderer | 169 // Return a dummy RendererPreferences object that will be used by the renderer |
| 185 // associated with the owning RenderViewHost. | 170 // associated with the owning RenderViewHost. |
| 186 virtual RendererPreferences GetRendererPrefs( | 171 virtual RendererPreferences GetRendererPrefs( |
| 187 BrowserContext* browser_context) const = 0; | 172 BrowserContext* browser_context) const = 0; |
| 188 | 173 |
| 189 // Returns a WebPreferences object that will be used by the renderer | 174 // Returns a WebPreferences object that will be used by the renderer |
| 190 // associated with the owning render view host. | 175 // associated with the owning render view host. |
| 191 virtual WebPreferences GetWebkitPrefs(); | 176 virtual WebPreferences GetWebkitPrefs(); |
| 192 | 177 |
| 193 // Notification the user has made a gesture while focus was on the | 178 // Notification the user has made a gesture while focus was on the |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 virtual void AccessibilityEventReceived( | 319 virtual void AccessibilityEventReceived( |
| 335 const std::vector<AXEventNotificationDetails>& details) {} | 320 const std::vector<AXEventNotificationDetails>& details) {} |
| 336 | 321 |
| 337 protected: | 322 protected: |
| 338 virtual ~RenderViewHostDelegate() {} | 323 virtual ~RenderViewHostDelegate() {} |
| 339 }; | 324 }; |
| 340 | 325 |
| 341 } // namespace content | 326 } // namespace content |
| 342 | 327 |
| 343 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 328 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |