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

Side by Side Diff: content/browser/mock_content_browser_client.cc

Issue 8705002: Move render widget host test to content unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/mock_content_browser_client.h" 5 #include "content/browser/mock_content_browser_client.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "content/browser/webui/empty_web_ui_factory.h" 11 #include "content/browser/webui/empty_web_ui_factory.h"
12 #include "content/test/test_tab_contents_view.h" 12 #include "content/test/test_tab_contents_view.h"
13 #include "googleurl/src/gurl.h" 13 #include "googleurl/src/gurl.h"
14 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
15 #include "ui/base/clipboard/clipboard.h" 15 #include "ui/base/clipboard/clipboard.h"
16 #include "webkit/glue/webpreferences.h" 16 #include "webkit/glue/webpreferences.h"
17 17
18 #if defined(USE_AURA)
19 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
20 #elif defined(OS_WIN)
21 #include "content/browser/renderer_host/render_widget_host_view_win.h"
22 #elif defined(TOOLKIT_USES_GTK)
23 #include "content/browser/renderer_host/render_widget_host_view_gtk.h"
24 #elif defined(OS_MACOSX)
25 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
26 #endif
27
18 namespace content { 28 namespace content {
19 29
20 MockContentBrowserClient::MockContentBrowserClient() { 30 MockContentBrowserClient::MockContentBrowserClient() {
21 } 31 }
22 32
23 MockContentBrowserClient::~MockContentBrowserClient() { 33 MockContentBrowserClient::~MockContentBrowserClient() {
24 } 34 }
25 35
26 BrowserMainParts* MockContentBrowserClient::CreateBrowserMainParts( 36 BrowserMainParts* MockContentBrowserClient::CreateBrowserMainParts(
27 const content::MainFunctionParams& parameters) { 37 const content::MainFunctionParams& parameters) {
28 return NULL; 38 return NULL;
29 } 39 }
30 40
31 RenderWidgetHostView* MockContentBrowserClient::CreateViewForWidget( 41 RenderWidgetHostView* MockContentBrowserClient::CreateViewForWidget(
32 RenderWidgetHost* widget) { 42 RenderWidgetHost* widget) {
33 return NULL; 43 #if defined(USE_AURA)
44 return new RenderWidgetHostViewAura(widget);
45 #elif defined(OS_WIN)
46 return new RenderWidgetHostViewWin(widget);
47 #elif defined(TOOLKIT_USES_GTK)
48 return new RenderWidgetHostViewGtk(widget);
49 #elif defined(OS_MACOSX)
50 return render_widget_host_view_mac::CreateRenderWidgetHostView(widget);
51 #else
52 #error Need to create your platform ViewForWidget here.
53 #endif
34 } 54 }
35 55
36 TabContentsView* MockContentBrowserClient::CreateTabContentsView( 56 TabContentsView* MockContentBrowserClient::CreateTabContentsView(
37 TabContents* tab_contents) { 57 TabContents* tab_contents) {
38 return new TestTabContentsView; 58 return new TestTabContentsView;
39 } 59 }
40 60
41 void MockContentBrowserClient::RenderViewHostCreated( 61 void MockContentBrowserClient::RenderViewHostCreated(
42 RenderViewHost* render_view_host) { 62 RenderViewHost* render_view_host) {
43 } 63 }
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 #endif 334 #endif
315 335
316 #if defined(USE_NSS) 336 #if defined(USE_NSS)
317 crypto::CryptoModuleBlockingPasswordDelegate* 337 crypto::CryptoModuleBlockingPasswordDelegate*
318 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) { 338 MockContentBrowserClient::GetCryptoPasswordDelegate(const GURL& url) {
319 return NULL; 339 return NULL;
320 } 340 }
321 #endif 341 #endif
322 342
323 } // namespace content 343 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698