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

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

Issue 880713003: Rename scheduleAnimation() to scheduleVisualUpdate(). (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase. Created 5 years, 11 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
« no previous file with comments | « sky/engine/core/page/Chrome.h ('k') | sky/engine/core/page/ChromeClient.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, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
11 * This library is distributed in the hope that it will be useful, 11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 14 * Library General Public License for more details.
15 * 15 *
16 * You should have received a copy of the GNU Library General Public License 16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to 17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA. 19 * Boston, MA 02110-1301, USA.
20 */ 20 */
21 21
22 #include "sky/engine/config.h" 22 #include "sky/engine/config.h"
23 #include "sky/engine/core/page/Chrome.h" 23 #include "sky/engine/core/page/Chrome.h"
24 24
25 #include "sky/engine/core/dom/Document.h" 25 #include "sky/engine/core/dom/Document.h"
26 #include "sky/engine/core/frame/LocalFrame.h" 26 #include "sky/engine/core/frame/LocalFrame.h"
27 #include "sky/engine/core/page/ChromeClient.h" 27 #include "sky/engine/core/page/ChromeClient.h"
28 #include "sky/engine/core/page/Page.h"
29 #include "sky/engine/core/rendering/HitTestResult.h" 28 #include "sky/engine/core/rendering/HitTestResult.h"
30 #include "sky/engine/platform/Logging.h" 29 #include "sky/engine/platform/Logging.h"
31 #include "sky/engine/platform/geometry/FloatRect.h" 30 #include "sky/engine/platform/geometry/FloatRect.h"
32 #include "sky/engine/public/platform/WebScreenInfo.h" 31 #include "sky/engine/public/platform/WebScreenInfo.h"
33 #include "sky/engine/wtf/PassRefPtr.h" 32 #include "sky/engine/wtf/PassRefPtr.h"
34 #include "sky/engine/wtf/Vector.h" 33 #include "sky/engine/wtf/Vector.h"
35 34
36 namespace blink { 35 namespace blink {
37 36
38 Chrome::Chrome(Page* page, ChromeClient* client) 37 Chrome::Chrome(ChromeClient* client)
39 : m_page(page) 38 : m_client(client)
40 , m_client(client)
41 { 39 {
42 ASSERT(m_client); 40 ASSERT(m_client);
43 } 41 }
44 42
45 Chrome::~Chrome() 43 Chrome::~Chrome()
46 { 44 {
47 } 45 }
48 46
49 PassOwnPtr<Chrome> Chrome::create(Page* page, ChromeClient* client) 47 PassOwnPtr<Chrome> Chrome::create(ChromeClient* client)
50 { 48 {
51 return adoptPtr(new Chrome(page, client)); 49 return adoptPtr(new Chrome(client));
52 } 50 }
53 51
54 IntRect Chrome::rootViewToScreen(const IntRect& rect) const 52 IntRect Chrome::rootViewToScreen(const IntRect& rect) const
55 { 53 {
56 return m_client->rootViewToScreen(rect); 54 return m_client->rootViewToScreen(rect);
57 } 55 }
58 56
59 blink::WebScreenInfo Chrome::screenInfo() const 57 blink::WebScreenInfo Chrome::screenInfo() const
60 { 58 {
61 return m_client->screenInfo(); 59 return m_client->screenInfo();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void Chrome::show(NavigationPolicy policy) const 97 void Chrome::show(NavigationPolicy policy) const
100 { 98 {
101 m_client->show(policy); 99 m_client->show(policy);
102 } 100 }
103 101
104 void Chrome::setCursor(const Cursor& cursor) 102 void Chrome::setCursor(const Cursor& cursor)
105 { 103 {
106 m_client->setCursor(cursor); 104 m_client->setCursor(cursor);
107 } 105 }
108 106
109 void Chrome::scheduleAnimation() 107 void Chrome::scheduleVisualUpdate()
110 { 108 {
111 WTF_LOG(ScriptedAnimationController, "Chrome::scheduleAnimation"); 109 m_client->scheduleVisualUpdate();
112 m_page->animator().setAnimationFramePending();
113 m_client->scheduleAnimation();
114 } 110 }
115 111
116 void Chrome::willBeDestroyed() 112 void Chrome::willBeDestroyed()
117 { 113 {
118 m_client->chromeDestroyed(); 114 m_client->chromeDestroyed();
119 } 115 }
120 116
121 } // namespace blink 117 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/page/Chrome.h ('k') | sky/engine/core/page/ChromeClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698