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

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

Issue 596623002: Fix orientation change callbacks to go through WebLocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3110 matching lines...) Expand 10 before | Expand all | Expand 10 after
3121 if (webview()) 3121 if (webview())
3122 webview()->performMediaPlayerAction(action, location); 3122 webview()->performMediaPlayerAction(action, location);
3123 } 3123 }
3124 3124
3125 void RenderViewImpl::OnOrientationChange() { 3125 void RenderViewImpl::OnOrientationChange() {
3126 // TODO(mlamouri): consumers of that event should be using DisplayObserver. 3126 // TODO(mlamouri): consumers of that event should be using DisplayObserver.
3127 FOR_EACH_OBSERVER(RenderViewObserver, 3127 FOR_EACH_OBSERVER(RenderViewObserver,
3128 observers_, 3128 observers_,
3129 OrientationChangeEvent()); 3129 OrientationChangeEvent());
3130 3130
3131 webview()->mainFrame()->sendOrientationChangeEvent(); 3131 DCHECK(webview()->mainFrame()->isWebLocalFrame());
jam 2014/09/23 05:17:13 nit: no need, if it's null the next line will be j
dcheng 2014/09/23 05:24:34 Done.
3132 webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent();
3132 } 3133 }
3133 3134
3134 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, 3135 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location,
3135 const WebPluginAction& action) { 3136 const WebPluginAction& action) {
3136 if (webview()) 3137 if (webview())
3137 webview()->performPluginAction(action, location); 3138 webview()->performPluginAction(action, location);
3138 } 3139 }
3139 3140
3140 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( 3141 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage(
3141 const GURL& page_url) { 3142 const GURL& page_url) {
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
4216 std::vector<gfx::Size> sizes; 4217 std::vector<gfx::Size> sizes;
4217 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4218 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4218 if (!url.isEmpty()) 4219 if (!url.isEmpty())
4219 urls.push_back( 4220 urls.push_back(
4220 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4221 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4221 } 4222 }
4222 SendUpdateFaviconURL(urls); 4223 SendUpdateFaviconURL(urls);
4223 } 4224 }
4224 4225
4225 } // namespace content 4226 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698