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_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/gfx/rect.h" | 11 #include "base/gfx/rect.h" |
12 #include "base/waitable_event.h" | 12 #include "base/waitable_event.h" |
| 13 #include "chrome/browser/dom_ui/dom_ui_factory.h" |
13 #include "webkit/glue/webpreferences.h" | 14 #include "webkit/glue/webpreferences.h" |
14 #include "webkit/glue/window_open_disposition.h" | 15 #include "webkit/glue/window_open_disposition.h" |
15 | 16 |
16 class Browser; | 17 class Browser; |
17 class PrefService; | 18 class PrefService; |
18 class Profile; | 19 class Profile; |
19 class RenderProcessHost; | 20 class RenderProcessHost; |
20 class RenderViewHost; | 21 class RenderViewHost; |
21 class RenderWidgetHost; | 22 class RenderWidgetHost; |
22 class RenderWidgetHostView; | 23 class RenderWidgetHostView; |
23 class SiteInstance; | 24 class SiteInstance; |
24 class TabContents; | 25 class TabContents; |
25 | 26 |
26 // Provides helper methods that provide common implementations of some | 27 // Provides helper methods that provide common implementations of some |
27 // RenderViewHostDelegate::View methods. | 28 // RenderViewHostDelegate::View methods. |
28 class RenderViewHostDelegateViewHelper { | 29 class RenderViewHostDelegateViewHelper { |
29 public: | 30 public: |
30 RenderViewHostDelegateViewHelper() {} | 31 RenderViewHostDelegateViewHelper() {} |
31 | 32 |
32 virtual void CreateNewWindow(int route_id, | 33 virtual void CreateNewWindow(int route_id, |
33 base::WaitableEvent* modal_dialog_event, | 34 base::WaitableEvent* modal_dialog_event, |
34 Profile* profile, SiteInstance* site); | 35 Profile* profile, SiteInstance* site, |
| 36 DOMUITypeID domui_type); |
35 virtual RenderWidgetHostView* CreateNewWidget(int route_id, bool activatable, | 37 virtual RenderWidgetHostView* CreateNewWidget(int route_id, bool activatable, |
36 RenderProcessHost* process); | 38 RenderProcessHost* process); |
37 virtual TabContents* GetCreatedWindow(int route_id); | 39 virtual TabContents* GetCreatedWindow(int route_id); |
38 virtual RenderWidgetHostView* GetCreatedWidget(int route_id); | 40 virtual RenderWidgetHostView* GetCreatedWidget(int route_id); |
39 void RenderWidgetHostDestroyed(RenderWidgetHost* host); | 41 void RenderWidgetHostDestroyed(RenderWidgetHost* host); |
40 | 42 |
41 private: | 43 private: |
42 // Tracks created TabContents objects that have not been shown yet. They are | 44 // Tracks created TabContents objects that have not been shown yet. They are |
43 // identified by the route ID passed to CreateNewWindow. | 45 // identified by the route ID passed to CreateNewWindow. |
44 typedef std::map<int, TabContents*> PendingContents; | 46 typedef std::map<int, TabContents*> PendingContents; |
(...skipping 14 matching lines...) Expand all Loading... |
59 public: | 61 public: |
60 static WebPreferences GetWebkitPrefs(PrefService* prefs, bool is_dom_ui); | 62 static WebPreferences GetWebkitPrefs(PrefService* prefs, bool is_dom_ui); |
61 | 63 |
62 private: | 64 private: |
63 RenderViewHostDelegateHelper(); | 65 RenderViewHostDelegateHelper(); |
64 | 66 |
65 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper); | 67 DISALLOW_COPY_AND_ASSIGN(RenderViewHostDelegateHelper); |
66 }; | 68 }; |
67 | 69 |
68 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ | 70 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_HOST_DELEGATE_HELPER_H_ |
OLD | NEW |