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

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: rebase 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
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 4013 matching lines...) Expand 10 before | Expand all | Expand 10 after
4024 4024
4025 elastic_overscroll_ += elastic_overscroll_delta; 4025 elastic_overscroll_ += elastic_overscroll_delta;
4026 4026
4027 if (MainFrameImpl() && MainFrameImpl()->GetFrameView()) 4027 if (MainFrameImpl() && MainFrameImpl()->GetFrameView())
4028 MainFrameImpl()->GetFrameView()->DidUpdateElasticOverscroll(); 4028 MainFrameImpl()->GetFrameView()->DidUpdateElasticOverscroll();
4029 } 4029 }
4030 4030
4031 void WebViewImpl::RecordWheelAndTouchScrollingCount( 4031 void WebViewImpl::RecordWheelAndTouchScrollingCount(
4032 bool has_scrolled_by_wheel, 4032 bool has_scrolled_by_wheel,
4033 bool has_scrolled_by_touch) { 4033 bool has_scrolled_by_touch) {
4034 if (!GetPage() || !GetPage()->MainFrame()) 4034 if (!MainFrameImpl())
4035 return; 4035 return;
4036 4036
4037 if (has_scrolled_by_wheel) 4037 if (has_scrolled_by_wheel)
4038 UseCounter::Count(GetPage()->MainFrame(), UseCounter::kScrollByWheel); 4038 UseCounter::Count(MainFrameImpl()->GetFrame(), UseCounter::kScrollByWheel);
4039 if (has_scrolled_by_touch) 4039 if (has_scrolled_by_touch)
4040 UseCounter::Count(GetPage()->MainFrame(), UseCounter::kScrollByTouch); 4040 UseCounter::Count(MainFrameImpl()->GetFrame(), UseCounter::kScrollByTouch);
4041 } 4041 }
4042 4042
4043 void WebViewImpl::UpdateLayerTreeViewport() { 4043 void WebViewImpl::UpdateLayerTreeViewport() {
4044 if (!GetPage() || !layer_tree_view_) 4044 if (!GetPage() || !layer_tree_view_)
4045 return; 4045 return;
4046 4046
4047 layer_tree_view_->SetPageScaleFactorAndLimits( 4047 layer_tree_view_->SetPageScaleFactorAndLimits(
4048 PageScaleFactor(), MinimumPageScaleFactor(), MaximumPageScaleFactor()); 4048 PageScaleFactor(), MinimumPageScaleFactor(), MaximumPageScaleFactor());
4049 } 4049 }
4050 4050
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
4157 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4157 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4158 return nullptr; 4158 return nullptr;
4159 return focused_frame; 4159 return focused_frame;
4160 } 4160 }
4161 4161
4162 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4162 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4163 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4163 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4164 } 4164 }
4165 4165
4166 } // namespace blink 4166 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698