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

Side by Side Diff: content/renderer/render_widget.cc

Issue 7982015: Remove old WEBWIDGET_HAS_ANIMATE_CHANGES ifdefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 TRACE_EVENT0("renderer", "RenderWidget::AnimateIfNeeded") 629 TRACE_EVENT0("renderer", "RenderWidget::AnimateIfNeeded")
630 animation_floor_time_ = now + 630 animation_floor_time_ = now +
631 base::TimeDelta::FromMilliseconds(animationInterval); 631 base::TimeDelta::FromMilliseconds(animationInterval);
632 // Set a timer to call us back after animationInterval before 632 // Set a timer to call us back after animationInterval before
633 // running animation callbacks so that if a callback requests another 633 // running animation callbacks so that if a callback requests another
634 // we'll be sure to run it at the proper time. 634 // we'll be sure to run it at the proper time.
635 MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod( 635 MessageLoop::current()->PostDelayedTask(FROM_HERE, NewRunnableMethod(
636 this, &RenderWidget::AnimationCallback), animationInterval); 636 this, &RenderWidget::AnimationCallback), animationInterval);
637 animation_task_posted_ = true; 637 animation_task_posted_ = true;
638 animation_update_pending_ = false; 638 animation_update_pending_ = false;
639 #ifdef WEBWIDGET_HAS_ANIMATE_CHANGES
640 webwidget_->animate(0.0); 639 webwidget_->animate(0.0);
641 #else
642 webwidget_->animate();
643 #endif
644 return; 640 return;
645 } 641 }
646 TRACE_EVENT0("renderer", "EarlyOut_AnimatedTooRecently"); 642 TRACE_EVENT0("renderer", "EarlyOut_AnimatedTooRecently");
647 if (animation_task_posted_) 643 if (animation_task_posted_)
648 return; 644 return;
649 // This code uses base::Time::Now() to calculate the floor and next fire 645 // This code uses base::Time::Now() to calculate the floor and next fire
650 // time because javascript's Date object uses base::Time::Now(). The 646 // time because javascript's Date object uses base::Time::Now(). The
651 // message loop uses base::TimeTicks, which on windows can have a 647 // message loop uses base::TimeTicks, which on windows can have a
652 // different granularity than base::Time. 648 // different granularity than base::Time.
653 // The upshot of all this is that this function might be called before 649 // The upshot of all this is that this function might be called before
(...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 1382
1387 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { 1383 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) {
1388 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); 1384 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin();
1389 i != plugin_window_moves_.end(); ++i) { 1385 i != plugin_window_moves_.end(); ++i) {
1390 if (i->window == window) { 1386 if (i->window == window) {
1391 plugin_window_moves_.erase(i); 1387 plugin_window_moves_.erase(i);
1392 break; 1388 break;
1393 } 1389 }
1394 } 1390 }
1395 } 1391 }
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_widget_fullscreen_pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698