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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameHost.cpp

Issue 2732363003: Make TopDocumentRootScrollerController store Page instead of FrameHost (Closed)
Patch Set: Created 3 years, 9 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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 FrameHost::FrameHost(Page& page) 50 FrameHost::FrameHost(Page& page)
51 : m_page(&page), 51 : m_page(&page),
52 m_browserControls(BrowserControls::create(*this)), 52 m_browserControls(BrowserControls::create(*this)),
53 m_visualViewport(VisualViewport::create(*this)), 53 m_visualViewport(VisualViewport::create(*this)),
54 m_overscrollController( 54 m_overscrollController(
55 OverscrollController::create(*m_visualViewport, 55 OverscrollController::create(*m_visualViewport,
56 m_page->chromeClient())), 56 m_page->chromeClient())),
57 m_eventHandlerRegistry(new EventHandlerRegistry(*this)), 57 m_eventHandlerRegistry(new EventHandlerRegistry(*this)),
58 m_consoleMessageStorage(new ConsoleMessageStorage()), 58 m_consoleMessageStorage(new ConsoleMessageStorage()),
59 m_globalRootScrollerController( 59 m_globalRootScrollerController(
60 TopDocumentRootScrollerController::create(*this)), 60 TopDocumentRootScrollerController::create(page)),
61 m_subframeCount(0) {} 61 m_subframeCount(0) {}
62 62
63 // Explicitly in the .cpp to avoid default constructor in .h 63 // Explicitly in the .cpp to avoid default constructor in .h
64 FrameHost::~FrameHost() {} 64 FrameHost::~FrameHost() {}
65 65
66 Page& FrameHost::page() { 66 Page& FrameHost::page() {
67 return *m_page; 67 return *m_page;
68 } 68 }
69 69
70 const Page& FrameHost::page() const { 70 const Page& FrameHost::page() const {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #endif 147 #endif
148 148
149 int FrameHost::subframeCount() const { 149 int FrameHost::subframeCount() const {
150 #if DCHECK_IS_ON() 150 #if DCHECK_IS_ON()
151 checkFrameCountConsistency(m_subframeCount + 1, m_page->mainFrame()); 151 checkFrameCountConsistency(m_subframeCount + 1, m_page->mainFrame());
152 #endif 152 #endif
153 return m_subframeCount; 153 return m_subframeCount;
154 } 154 }
155 155
156 } // namespace blink 156 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698