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

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2877893002: Make UseCounter take a LocaFrame instead of any Frame (Closed)
Patch Set: Fix compile Created 3 years, 6 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 | « third_party/WebKit/Source/core/page/FrameTree.cpp ('k') | no next file » | 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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 4007 matching lines...) Expand 10 before | Expand all | Expand 10 after
4018 4018
4019 elastic_overscroll_ += elastic_overscroll_delta; 4019 elastic_overscroll_ += elastic_overscroll_delta;
4020 4020
4021 if (MainFrameImpl() && MainFrameImpl()->GetFrameView()) 4021 if (MainFrameImpl() && MainFrameImpl()->GetFrameView())
4022 MainFrameImpl()->GetFrameView()->DidUpdateElasticOverscroll(); 4022 MainFrameImpl()->GetFrameView()->DidUpdateElasticOverscroll();
4023 } 4023 }
4024 4024
4025 void WebViewImpl::RecordWheelAndTouchScrollingCount( 4025 void WebViewImpl::RecordWheelAndTouchScrollingCount(
4026 bool has_scrolled_by_wheel, 4026 bool has_scrolled_by_wheel,
4027 bool has_scrolled_by_touch) { 4027 bool has_scrolled_by_touch) {
4028 if (!GetPage() || !GetPage()->MainFrame()) 4028 if (!MainFrameImpl())
4029 return; 4029 return;
4030 4030
4031 if (has_scrolled_by_wheel) 4031 if (has_scrolled_by_wheel)
4032 UseCounter::Count(GetPage()->MainFrame(), UseCounter::kScrollByWheel); 4032 UseCounter::Count(MainFrameImpl()->GetFrame(), UseCounter::kScrollByWheel);
4033 if (has_scrolled_by_touch) 4033 if (has_scrolled_by_touch)
4034 UseCounter::Count(GetPage()->MainFrame(), UseCounter::kScrollByTouch); 4034 UseCounter::Count(MainFrameImpl()->GetFrame(), UseCounter::kScrollByTouch);
4035 } 4035 }
4036 4036
4037 void WebViewImpl::UpdateLayerTreeViewport() { 4037 void WebViewImpl::UpdateLayerTreeViewport() {
4038 if (!GetPage() || !layer_tree_view_) 4038 if (!GetPage() || !layer_tree_view_)
4039 return; 4039 return;
4040 4040
4041 layer_tree_view_->SetPageScaleFactorAndLimits( 4041 layer_tree_view_->SetPageScaleFactorAndLimits(
4042 PageScaleFactor(), MinimumPageScaleFactor(), MaximumPageScaleFactor()); 4042 PageScaleFactor(), MinimumPageScaleFactor(), MaximumPageScaleFactor());
4043 } 4043 }
4044 4044
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4151 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4151 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4152 return nullptr; 4152 return nullptr;
4153 return focused_frame; 4153 return focused_frame;
4154 } 4154 }
4155 4155
4156 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4156 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4157 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4157 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4158 } 4158 }
4159 4159
4160 } // namespace blink 4160 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/page/FrameTree.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698