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

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

Issue 696733003: Introduce blink::ServiceProvider (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 float deviceScaleFactor(LocalFrame* frame) 84 float deviceScaleFactor(LocalFrame* frame)
85 { 85 {
86 if (!frame) 86 if (!frame)
87 return 1; 87 return 1;
88 Page* page = frame->page(); 88 Page* page = frame->page();
89 if (!page) 89 if (!page)
90 return 1; 90 return 1;
91 return page->deviceScaleFactor(); 91 return page->deviceScaleFactor();
92 } 92 }
93 93
94 Page::Page(PageClients& pageClients) 94 Page::Page(PageClients& pageClients, ServiceProvider* services)
95 : SettingsDelegate(Settings::create()) 95 : SettingsDelegate(Settings::create())
96 , m_animator(this) 96 , m_animator(this)
97 , m_autoscrollController(AutoscrollController::create(*this)) 97 , m_autoscrollController(AutoscrollController::create(*this))
98 , m_chrome(Chrome::create(this, pageClients.chromeClient)) 98 , m_chrome(Chrome::create(this, pageClients.chromeClient))
99 , m_dragCaretController(DragCaretController::create()) 99 , m_dragCaretController(DragCaretController::create())
100 , m_focusController(FocusController::create(this)) 100 , m_focusController(FocusController::create(this))
101 , m_undoStack(UndoStack::create()) 101 , m_undoStack(UndoStack::create())
102 , m_mainFrame(0) 102 , m_mainFrame(0)
103 , m_editorClient(pageClients.editorClient) 103 , m_editorClient(pageClients.editorClient)
104 , m_spellCheckerClient(pageClients.spellCheckerClient) 104 , m_spellCheckerClient(pageClients.spellCheckerClient)
105 , m_tabKeyCyclesThroughElements(true) 105 , m_tabKeyCyclesThroughElements(true)
106 , m_deviceScaleFactor(1) 106 , m_deviceScaleFactor(1)
107 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval()) 107 , m_timerAlignmentInterval(DOMTimer::visiblePageAlignmentInterval())
108 , m_visibilityState(PageVisibilityStateVisible) 108 , m_visibilityState(PageVisibilityStateVisible)
109 , m_isCursorVisible(true) 109 , m_isCursorVisible(true)
110 #if ENABLE(ASSERT) 110 #if ENABLE(ASSERT)
111 , m_isPainting(false) 111 , m_isPainting(false)
112 #endif 112 #endif
113 , m_frameHost(FrameHost::create(*this)) 113 , m_frameHost(FrameHost::create(*this, services))
114 { 114 {
115 ASSERT(m_editorClient); 115 ASSERT(m_editorClient);
116 116
117 ASSERT(!allPages().contains(this)); 117 ASSERT(!allPages().contains(this));
118 allPages().add(this); 118 allPages().add(this);
119 119
120 #ifndef NDEBUG 120 #ifndef NDEBUG
121 pageCounter.increment(); 121 pageCounter.increment();
122 #endif 122 #endif
123 } 123 }
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 , editorClient(0) 378 , editorClient(0)
379 , spellCheckerClient(0) 379 , spellCheckerClient(0)
380 { 380 {
381 } 381 }
382 382
383 Page::PageClients::~PageClients() 383 Page::PageClients::~PageClients()
384 { 384 {
385 } 385 }
386 386
387 } // namespace blink 387 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698