Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: content/shell/shell_content_browser_client.cc

Issue 9190018: Support sharing of ContentMain and BrowserMain code with embedded use cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "content/shell/shell_content_browser_client.h" 5 #include "content/shell/shell_content_browser_client.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "content/browser/webui/empty_web_ui_factory.h" 8 #include "content/browser/webui/empty_web_ui_factory.h"
9 #include "content/shell/shell.h" 9 #include "content/shell/shell.h"
10 #include "content/shell/shell_browser_main.h" 10 #include "content/shell/shell_browser_main.h"
11 #include "googleurl/src/gurl.h" 11 #include "googleurl/src/gurl.h"
12 #include "third_party/skia/include/core/SkBitmap.h" 12 #include "third_party/skia/include/core/SkBitmap.h"
13 #include "webkit/glue/webpreferences.h" 13 #include "webkit/glue/webpreferences.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include "content/browser/tab_contents/tab_contents.h" 16 #include "content/browser/tab_contents/tab_contents.h"
17 #include "content/browser/tab_contents/tab_contents_view_win.h" 17 #include "content/browser/tab_contents/tab_contents_view_win.h"
18 #include "content/common/view_messages.h" 18 #include "content/common/view_messages.h"
19 #endif 19 #endif
20 20
21 namespace content { 21 namespace content {
22 22
23 ShellContentBrowserClient::ShellContentBrowserClient() 23 ShellContentBrowserClient::ShellContentBrowserClient(
24 : shell_browser_main_parts_(NULL) { 24 ShellMainDelegate* delegate)
25 : delegate_(delegate),
26 shell_browser_main_parts_(NULL) {
25 } 27 }
26 28
27 ShellContentBrowserClient::~ShellContentBrowserClient() { 29 ShellContentBrowserClient::~ShellContentBrowserClient() {
28 } 30 }
29 31
30 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( 32 BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts(
31 const content::MainFunctionParams& parameters) { 33 const content::MainFunctionParams& parameters) {
32 return new ShellBrowserMainParts(parameters); 34 return new ShellBrowserMainParts(delegate_, parameters);
33 } 35 }
34 36
35 TabContentsView* ShellContentBrowserClient::CreateTabContentsView( 37 TabContentsView* ShellContentBrowserClient::CreateTabContentsView(
36 TabContents* tab_contents) { 38 TabContents* tab_contents) {
37 #if defined(OS_WIN) 39 #if defined(OS_WIN)
38 return new TabContentsViewWin(tab_contents, this); 40 return new TabContentsViewWin(tab_contents, this);
39 #else 41 #else
40 return NULL; 42 return NULL;
41 #endif 43 #endif
42 } 44 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 tab_contents_view->tab_contents()->GetBrowserContext(), 333 tab_contents_view->tab_contents()->GetBrowserContext(),
332 GURL(), 334 GURL(),
333 tab_contents_view->tab_contents()->GetSiteInstance(), 335 tab_contents_view->tab_contents()->GetSiteInstance(),
334 route_id, 336 route_id,
335 tab_contents_view->tab_contents()); 337 tab_contents_view->tab_contents());
336 return shell->tab_contents(); 338 return shell->tab_contents();
337 } 339 }
338 #endif 340 #endif
339 341
340 } // namespace content 342 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698