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

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

Issue 1006073002: Null check webview() before using it in RenderViewImpl::OnOrientationChange (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | 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 // 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 3006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3017 } 3017 }
3018 } 3018 }
3019 3019
3020 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location, 3020 void RenderViewImpl::OnMediaPlayerActionAt(const gfx::Point& location,
3021 const WebMediaPlayerAction& action) { 3021 const WebMediaPlayerAction& action) {
3022 if (webview()) 3022 if (webview())
3023 webview()->performMediaPlayerAction(action, location); 3023 webview()->performMediaPlayerAction(action, location);
3024 } 3024 }
3025 3025
3026 void RenderViewImpl::OnOrientationChange() { 3026 void RenderViewImpl::OnOrientationChange() {
3027 webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent(); 3027 if (webview() && webview()->mainFrame()->isWebLocalFrame())
3028 webview()->mainFrame()->toWebLocalFrame()->sendOrientationChangeEvent();
3028 } 3029 }
3029 3030
3030 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location, 3031 void RenderViewImpl::OnPluginActionAt(const gfx::Point& location,
3031 const WebPluginAction& action) { 3032 const WebPluginAction& action) {
3032 if (webview()) 3033 if (webview())
3033 webview()->performPluginAction(action, location); 3034 webview()->performPluginAction(action, location);
3034 } 3035 }
3035 3036
3036 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage( 3037 void RenderViewImpl::OnGetAllSavableResourceLinksForCurrentPage(
3037 const GURL& page_url) { 3038 const GURL& page_url) {
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after
4028 std::vector<gfx::Size> sizes; 4029 std::vector<gfx::Size> sizes;
4029 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4030 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4030 if (!url.isEmpty()) 4031 if (!url.isEmpty())
4031 urls.push_back( 4032 urls.push_back(
4032 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4033 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4033 } 4034 }
4034 SendUpdateFaviconURL(urls); 4035 SendUpdateFaviconURL(urls);
4035 } 4036 }
4036 4037
4037 } // namespace content 4038 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698