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 #include "base/string_util.h" | 5 #include "base/string_util.h" |
6 #include "chrome/browser/browser_about_handler.h" | 6 #include "chrome/browser/browser_about_handler.h" |
7 #include "chrome/browser/browser_url_handler.h" | 7 #include "chrome/browser/browser_url_handler.h" |
8 #include "chrome/browser/dom_ui/dom_ui_contents.h" | 8 #include "chrome/browser/dom_ui/dom_ui_contents.h" |
9 #include "chrome/browser/dom_ui/new_tab_ui.h" | 9 #include "chrome/browser/dom_ui/new_tab_ui.h" |
10 #include "chrome/browser/profile.h" | 10 #include "chrome/browser/profile.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 | 39 |
40 // static | 40 // static |
41 TabContents* TabContents::CreateWithType(TabContentsType type, | 41 TabContents* TabContents::CreateWithType(TabContentsType type, |
42 Profile* profile, | 42 Profile* profile, |
43 SiteInstance* instance) { | 43 SiteInstance* instance) { |
44 TabContents* contents = NULL; | 44 TabContents* contents = NULL; |
45 | 45 |
46 switch (type) { | 46 switch (type) { |
47 case TAB_CONTENTS_WEB: | 47 case TAB_CONTENTS_WEB: |
48 contents = new WebContents(profile, instance, NULL, MSG_ROUTING_NONE, NULL
); | 48 contents = new WebContents(profile, instance, NULL, MSG_ROUTING_NONE, |
| 49 NULL); |
49 break; | 50 break; |
50 // TODO(port): remove this platform define, either by porting the tab contents | 51 // TODO(port): remove this platform define, either by porting the tab contents |
51 // types or removing them completely. | 52 // types or removing them completely. |
52 #if defined(OS_WIN) | 53 #if defined(OS_WIN) |
53 case TAB_CONTENTS_HTML_DIALOG: | 54 case TAB_CONTENTS_HTML_DIALOG: |
54 contents = new HtmlDialogContents(profile, instance, NULL); | 55 contents = new HtmlDialogContents(profile, instance, NULL); |
55 break; | 56 break; |
56 #endif // defined(OS_WIN) | 57 #endif // defined(OS_WIN) |
57 case TAB_CONTENTS_DEBUGGER: | 58 case TAB_CONTENTS_DEBUGGER: |
58 case TAB_CONTENTS_NEW_TAB_UI: | 59 case TAB_CONTENTS_NEW_TAB_UI: |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 g_extra_types->erase(type); | 138 g_extra_types->erase(type); |
138 if (g_extra_types->empty()) { | 139 if (g_extra_types->empty()) { |
139 delete g_extra_types; | 140 delete g_extra_types; |
140 g_extra_types = NULL; | 141 g_extra_types = NULL; |
141 } | 142 } |
142 } | 143 } |
143 | 144 |
144 return prev_factory; | 145 return prev_factory; |
145 } | 146 } |
146 | 147 |
OLD | NEW |