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

Side by Side Diff: sky/engine/core/page/Page.cpp

Issue 721473002: Removed ScrollingCoordinator and a bunch of composited scrolling' (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/page/Page.h ('k') | sky/engine/core/page/scrolling/ScrollingCoordinator.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) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All R ights Reserved.
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 21 matching lines...) Expand all
32 #include "core/frame/FrameHost.h" 32 #include "core/frame/FrameHost.h"
33 #include "core/frame/FrameView.h" 33 #include "core/frame/FrameView.h"
34 #include "core/frame/LocalDOMWindow.h" 34 #include "core/frame/LocalDOMWindow.h"
35 #include "core/frame/LocalFrame.h" 35 #include "core/frame/LocalFrame.h"
36 #include "core/frame/Settings.h" 36 #include "core/frame/Settings.h"
37 #include "core/page/AutoscrollController.h" 37 #include "core/page/AutoscrollController.h"
38 #include "core/page/Chrome.h" 38 #include "core/page/Chrome.h"
39 #include "core/page/ChromeClient.h" 39 #include "core/page/ChromeClient.h"
40 #include "core/page/FocusController.h" 40 #include "core/page/FocusController.h"
41 #include "core/page/PageLifecycleNotifier.h" 41 #include "core/page/PageLifecycleNotifier.h"
42 #include "core/page/scrolling/ScrollingCoordinator.h"
43 #include "core/rendering/RenderView.h" 42 #include "core/rendering/RenderView.h"
44 #include "wtf/HashMap.h" 43 #include "wtf/HashMap.h"
45 #include "wtf/RefCountedLeakCounter.h" 44 #include "wtf/RefCountedLeakCounter.h"
46 #include "wtf/StdLibExtras.h" 45 #include "wtf/StdLibExtras.h"
47 #include "wtf/text/Base64.h" 46 #include "wtf/text/Base64.h"
48 47
49 namespace blink { 48 namespace blink {
50 49
51 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page")); 50 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, pageCounter, ("Page"));
52 51
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // willBeDestroyed() must be called before Page destruction. 126 // willBeDestroyed() must be called before Page destruction.
128 ASSERT(!m_mainFrame); 127 ASSERT(!m_mainFrame);
129 } 128 }
130 129
131 void Page::makeOrdinary() 130 void Page::makeOrdinary()
132 { 131 {
133 ASSERT(!ordinaryPages().contains(this)); 132 ASSERT(!ordinaryPages().contains(this));
134 ordinaryPages().add(this); 133 ordinaryPages().add(this);
135 } 134 }
136 135
137 ScrollingCoordinator* Page::scrollingCoordinator()
138 {
139 if (!m_scrollingCoordinator)
140 m_scrollingCoordinator = ScrollingCoordinator::create(this);
141
142 return m_scrollingCoordinator.get();
143 }
144
145 void Page::setMainFrame(LocalFrame* mainFrame) 136 void Page::setMainFrame(LocalFrame* mainFrame)
146 { 137 {
147 // Should only be called during initialization or swaps between local and 138 // Should only be called during initialization or swaps between local and
148 // remote frames. 139 // remote frames.
149 // FIXME: Unfortunately we can't assert on this at the moment, because this 140 // FIXME: Unfortunately we can't assert on this at the moment, because this
150 // is called in the base constructor for both LocalFrame and RemoteFrame, 141 // is called in the base constructor for both LocalFrame and RemoteFrame,
151 // when the vtables for the derived classes have not yet been setup. 142 // when the vtables for the derived classes have not yet been setup.
152 m_mainFrame = mainFrame; 143 m_mainFrame = mainFrame;
153 } 144 }
154 145
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 { 331 {
341 RefPtr<LocalFrame> mainFrame = m_mainFrame; 332 RefPtr<LocalFrame> mainFrame = m_mainFrame;
342 333
343 mainFrame->detach(); 334 mainFrame->detach();
344 mainFrame->setView(nullptr); 335 mainFrame->setView(nullptr);
345 336
346 allPages().remove(this); 337 allPages().remove(this);
347 if (ordinaryPages().contains(this)) 338 if (ordinaryPages().contains(this))
348 ordinaryPages().remove(this); 339 ordinaryPages().remove(this);
349 340
350 if (m_scrollingCoordinator)
351 m_scrollingCoordinator->willBeDestroyed();
352
353 #ifndef NDEBUG 341 #ifndef NDEBUG
354 pageCounter.decrement(); 342 pageCounter.decrement();
355 #endif 343 #endif
356 344
357 m_chrome->willBeDestroyed(); 345 m_chrome->willBeDestroyed();
358 m_mainFrame = 0; 346 m_mainFrame = 0;
359 } 347 }
360 348
361 Page::PageClients::PageClients() 349 Page::PageClients::PageClients()
362 : chromeClient(0) 350 : chromeClient(0)
363 , editorClient(0) 351 , editorClient(0)
364 , spellCheckerClient(0) 352 , spellCheckerClient(0)
365 { 353 {
366 } 354 }
367 355
368 Page::PageClients::~PageClients() 356 Page::PageClients::~PageClients()
369 { 357 {
370 } 358 }
371 359
372 } // namespace blink 360 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/Page.h ('k') | sky/engine/core/page/scrolling/ScrollingCoordinator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698