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

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

Issue 2873213002: Add PlatformFrameView class. (Closed)
Patch Set: #include PlatformFrameView inside platform.dll Created 3 years, 7 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 const IntRect&) const {} 673 const IntRect&) const {}
674 674
675 LocalFrame* VisualViewport::MainFrame() const { 675 LocalFrame* VisualViewport::MainFrame() const {
676 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame() 676 return GetPage().MainFrame() && GetPage().MainFrame()->IsLocalFrame()
677 ? GetPage().DeprecatedLocalMainFrame() 677 ? GetPage().DeprecatedLocalMainFrame()
678 : 0; 678 : 0;
679 } 679 }
680 680
681 bool VisualViewport::ScheduleAnimation() { 681 bool VisualViewport::ScheduleAnimation() {
682 if (PlatformChromeClient* client = GetChromeClient()) { 682 if (PlatformChromeClient* client = GetChromeClient()) {
683 client->ScheduleAnimation(MainFrame()); 683 client->ScheduleAnimation(MainFrame()->View());
684 return true; 684 return true;
685 } 685 }
686 return false; 686 return false;
687 } 687 }
688 688
689 void VisualViewport::ClampToBoundaries() { 689 void VisualViewport::ClampToBoundaries() {
690 SetLocation(FloatPoint(offset_)); 690 SetLocation(FloatPoint(offset_));
691 } 691 }
692 692
693 FloatRect VisualViewport::ViewportToRootFrame( 693 FloatRect VisualViewport::ViewportToRootFrame(
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 } else if (graphics_layer == root_transform_layer_.get()) { 856 } else if (graphics_layer == root_transform_layer_.get()) {
857 name = "Root Transform Layer"; 857 name = "Root Transform Layer";
858 } else { 858 } else {
859 NOTREACHED(); 859 NOTREACHED();
860 } 860 }
861 861
862 return name; 862 return name;
863 } 863 }
864 864
865 } // namespace blink 865 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameViewTest.cpp ('k') | third_party/WebKit/Source/core/loader/EmptyClients.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698