OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/process_util.h" | 14 #include "base/process_util.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "content/common/view_types.h" | 16 #include "content/common/view_types.h" |
17 #include "content/common/window_container_type.h" | 17 #include "content/common/window_container_type.h" |
18 #include "ipc/ipc_channel.h" | 18 #include "ipc/ipc_channel.h" |
19 #include "net/base/load_states.h" | 19 #include "net/base/load_states.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupType.h" |
22 #include "webkit/glue/window_open_disposition.h" | 22 #include "webkit/glue/window_open_disposition.h" |
23 | 23 |
24 class BackgroundContents; | 24 class BackgroundContents; |
25 struct BookmarkNodeData; | 25 struct BookmarkNodeData; |
26 class BookmarkNode; | 26 class BookmarkNode; |
27 struct ContextMenuParams; | 27 struct ContextMenuParams; |
28 class GURL; | 28 class GURL; |
29 struct NativeWebKeyboardEvent; | 29 struct NativeWebKeyboardEvent; |
30 class Profile; | |
31 struct RendererPreferences; | 30 struct RendererPreferences; |
32 class RenderProcessHost; | 31 class RenderProcessHost; |
33 class RenderViewHost; | 32 class RenderViewHost; |
34 class SkBitmap; | 33 class SkBitmap; |
35 class TabContents; | 34 class TabContents; |
36 struct ViewHostMsg_CreateWindow_Params; | 35 struct ViewHostMsg_CreateWindow_Params; |
37 struct ViewHostMsg_FrameNavigate_Params; | 36 struct ViewHostMsg_FrameNavigate_Params; |
38 struct WebDropData; | 37 struct WebDropData; |
39 struct WebMenuItem; | 38 struct WebMenuItem; |
40 class WebKeyboardEvent; | 39 class WebKeyboardEvent; |
41 struct WebPreferences; | 40 struct WebPreferences; |
42 | 41 |
| 42 namespace content { |
| 43 class BrowserContext; |
| 44 } |
| 45 |
43 namespace gfx { | 46 namespace gfx { |
44 class Point; | 47 class Point; |
45 class Rect; | 48 class Rect; |
46 class Size; | 49 class Size; |
47 } | 50 } |
48 | 51 |
49 // | 52 // |
50 // RenderViewHostDelegate | 53 // RenderViewHostDelegate |
51 // | 54 // |
52 // An interface implemented by an object interested in knowing about the state | 55 // An interface implemented by an object interested in knowing about the state |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 const int flags, | 291 const int flags, |
289 IPC::Message* reply_msg, | 292 IPC::Message* reply_msg, |
290 bool* did_suppress_message) {} | 293 bool* did_suppress_message) {} |
291 | 294 |
292 virtual void RunBeforeUnloadConfirm(const RenderViewHost* rvh, | 295 virtual void RunBeforeUnloadConfirm(const RenderViewHost* rvh, |
293 const string16& message, | 296 const string16& message, |
294 IPC::Message* reply_msg) {} | 297 IPC::Message* reply_msg) {} |
295 | 298 |
296 // Return a dummy RendererPreferences object that will be used by the renderer | 299 // Return a dummy RendererPreferences object that will be used by the renderer |
297 // associated with the owning RenderViewHost. | 300 // associated with the owning RenderViewHost. |
298 virtual RendererPreferences GetRendererPrefs(Profile* profile) const = 0; | 301 virtual RendererPreferences GetRendererPrefs( |
| 302 content::BrowserContext* browser_context) const = 0; |
299 | 303 |
300 // Returns a WebPreferences object that will be used by the renderer | 304 // Returns a WebPreferences object that will be used by the renderer |
301 // associated with the owning render view host. | 305 // associated with the owning render view host. |
302 virtual WebPreferences GetWebkitPrefs(); | 306 virtual WebPreferences GetWebkitPrefs(); |
303 | 307 |
304 // Notification the user has made a gesture while focus was on the | 308 // Notification the user has made a gesture while focus was on the |
305 // page. This is used to avoid uninitiated user downloads (aka carpet | 309 // page. This is used to avoid uninitiated user downloads (aka carpet |
306 // bombing), see DownloadRequestLimiter for details. | 310 // bombing), see DownloadRequestLimiter for details. |
307 virtual void OnUserGesture() {} | 311 virtual void OnUserGesture() {} |
308 | 312 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 virtual void HandleMouseDown() {} | 360 virtual void HandleMouseDown() {} |
357 virtual void HandleMouseLeave() {} | 361 virtual void HandleMouseLeave() {} |
358 virtual void HandleMouseUp() {} | 362 virtual void HandleMouseUp() {} |
359 virtual void HandleMouseActivate() {} | 363 virtual void HandleMouseActivate() {} |
360 | 364 |
361 protected: | 365 protected: |
362 virtual ~RenderViewHostDelegate() {} | 366 virtual ~RenderViewHostDelegate() {} |
363 }; | 367 }; |
364 | 368 |
365 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 369 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
OLD | NEW |