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

Side by Side Diff: Source/core/testing/DummyPageHolder.cpp

Issue 1291903003: Oilpan: Move ChromeClient classes into Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix a raw reference in InspectorOverlayImpl.cpp. Created 5 years, 4 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
« no previous file with comments | « Source/core/testing/DummyPageHolder.h ('k') | Source/platform/HostWindow.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, Google Inc. All rights reserved. 2 * Copyright (c) 2013, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 PassOwnPtr<DummyPageHolder> DummyPageHolder::create( 43 PassOwnPtr<DummyPageHolder> DummyPageHolder::create(
44 const IntSize& initialViewSize, 44 const IntSize& initialViewSize,
45 Page::PageClients* pageClients, 45 Page::PageClients* pageClients,
46 PassOwnPtr<FrameLoaderClient> frameLoaderClient) { 46 PassOwnPtr<FrameLoaderClient> frameLoaderClient) {
47 return adoptPtr(new DummyPageHolder(initialViewSize, pageClients, frameLoade rClient)); 47 return adoptPtr(new DummyPageHolder(initialViewSize, pageClients, frameLoade rClient));
48 } 48 }
49 49
50 DummyPageHolder::DummyPageHolder( 50 DummyPageHolder::DummyPageHolder(
51 const IntSize& initialViewSize, 51 const IntSize& initialViewSize,
52 Page::PageClients* pageClients, 52 Page::PageClients* pageClientsArgument,
53 PassOwnPtr<FrameLoaderClient> frameLoaderClient) 53 PassOwnPtr<FrameLoaderClient> frameLoaderClient)
54 { 54 {
55 if (!pageClients) { 55 Page::PageClients pageClients;
56 fillWithEmptyClients(m_pageClients); 56 if (!pageClientsArgument) {
57 fillWithEmptyClients(pageClients);
57 } else { 58 } else {
58 m_pageClients.chromeClient = pageClients->chromeClient; 59 pageClients.chromeClient = pageClientsArgument->chromeClient;
59 m_pageClients.contextMenuClient = pageClients->contextMenuClient; 60 pageClients.contextMenuClient = pageClientsArgument->contextMenuClient;
60 m_pageClients.editorClient = pageClients->editorClient; 61 pageClients.editorClient = pageClientsArgument->editorClient;
61 m_pageClients.dragClient = pageClients->dragClient; 62 pageClients.dragClient = pageClientsArgument->dragClient;
62 m_pageClients.spellCheckerClient = pageClients->spellCheckerClient; 63 pageClients.spellCheckerClient = pageClientsArgument->spellCheckerClient ;
63 } 64 }
64 m_page = adoptPtrWillBeNoop(new Page(m_pageClients)); 65 m_page = adoptPtrWillBeNoop(new Page(pageClients));
65 Settings& settings = m_page->settings(); 66 Settings& settings = m_page->settings();
66 // FIXME: http://crbug.com/363843. This needs to find a better way to 67 // FIXME: http://crbug.com/363843. This needs to find a better way to
67 // not create graphics layers. 68 // not create graphics layers.
68 settings.setAcceleratedCompositingEnabled(false); 69 settings.setAcceleratedCompositingEnabled(false);
69 70
70 m_frameLoaderClient = frameLoaderClient; 71 m_frameLoaderClient = frameLoaderClient;
71 if (!m_frameLoaderClient) 72 if (!m_frameLoaderClient)
72 m_frameLoaderClient = adoptPtr(new EmptyFrameLoaderClient); 73 m_frameLoaderClient = adoptPtr(new EmptyFrameLoaderClient);
73 74
74 m_frame = LocalFrame::create(m_frameLoaderClient.get(), &m_page->frameHost() , 0); 75 m_frame = LocalFrame::create(m_frameLoaderClient.get(), &m_page->frameHost() , 0);
(...skipping 23 matching lines...) Expand all
98 { 99 {
99 return *m_frame->view(); 100 return *m_frame->view();
100 } 101 }
101 102
102 Document& DummyPageHolder::document() const 103 Document& DummyPageHolder::document() const
103 { 104 {
104 return *m_frame->domWindow()->document(); 105 return *m_frame->domWindow()->document();
105 } 106 }
106 107
107 } // namespace blink 108 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/testing/DummyPageHolder.h ('k') | Source/platform/HostWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698