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

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

Issue 115293005: Add a layer of indirection between Frame and Page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make GCC happy Created 7 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 | « Source/core/svg/graphics/SVGImage.cpp ('k') | Source/web/WebFrameImpl.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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 { 47 {
48 m_pageClients.chromeClient = &m_chromeClient; 48 m_pageClients.chromeClient = &m_chromeClient;
49 m_pageClients.contextMenuClient = &m_contextMenuClient; 49 m_pageClients.contextMenuClient = &m_contextMenuClient;
50 m_pageClients.editorClient = &m_editorClient; 50 m_pageClients.editorClient = &m_editorClient;
51 m_pageClients.dragClient = &m_dragClient; 51 m_pageClients.dragClient = &m_dragClient;
52 m_pageClients.inspectorClient = &m_inspectorClient; 52 m_pageClients.inspectorClient = &m_inspectorClient;
53 m_pageClients.backForwardClient = &m_backForwardClient; 53 m_pageClients.backForwardClient = &m_backForwardClient;
54 54
55 m_page = adoptPtr(new Page(m_pageClients)); 55 m_page = adoptPtr(new Page(m_pageClients));
56 56
57 m_frame = Frame::create(FrameInit::create(0, m_page.get(), &m_frameLoaderCli ent)); 57 m_frame = Frame::create(FrameInit::create(0, &m_page->frameHost(), &m_frameL oaderClient));
58 m_frame->setView(FrameView::create(m_frame.get(), initialViewSize)); 58 m_frame->setView(FrameView::create(m_frame.get(), initialViewSize));
59 m_frame->init(); 59 m_frame->init();
60 } 60 }
61 61
62 DummyPageHolder::~DummyPageHolder() 62 DummyPageHolder::~DummyPageHolder()
63 { 63 {
64 m_page.clear(); 64 m_page.clear();
65 ASSERT(m_frame->hasOneRef()); 65 ASSERT(m_frame->hasOneRef());
66 m_frame.clear(); 66 m_frame.clear();
67 } 67 }
(...skipping 12 matching lines...) Expand all
80 { 80 {
81 return *m_frame->view(); 81 return *m_frame->view();
82 } 82 }
83 83
84 Document& DummyPageHolder::document() const 84 Document& DummyPageHolder::document() const
85 { 85 {
86 return *m_frame->domWindow()->document(); 86 return *m_frame->domWindow()->document();
87 } 87 }
88 88
89 } // namespace WebCore 89 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/svg/graphics/SVGImage.cpp ('k') | Source/web/WebFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698