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

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

Issue 185653006: Handle NULL RenderWidget in RenderViewImpl::createPopupMenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Again Created 6 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 | Annotate | Revision Log
« 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 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
1846 1846
1847 // Record whether the creator frame is trying to suppress the opener field. 1847 // Record whether the creator frame is trying to suppress the opener field.
1848 view->opener_suppressed_ = params.opener_suppressed; 1848 view->opener_suppressed_ = params.opener_suppressed;
1849 1849
1850 return view->webview(); 1850 return view->webview();
1851 } 1851 }
1852 1852
1853 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) { 1853 WebWidget* RenderViewImpl::createPopupMenu(blink::WebPopupType popup_type) {
1854 RenderWidget* widget = 1854 RenderWidget* widget =
1855 RenderWidget::Create(routing_id_, popup_type, screen_info_); 1855 RenderWidget::Create(routing_id_, popup_type, screen_info_);
1856 if (!widget)
1857 return NULL;
1856 if (screen_metrics_emulator_) { 1858 if (screen_metrics_emulator_) {
1857 widget->SetPopupOriginAdjustmentsForEmulation( 1859 widget->SetPopupOriginAdjustmentsForEmulation(
1858 screen_metrics_emulator_.get()); 1860 screen_metrics_emulator_.get());
1859 } 1861 }
1860 return widget->webwidget(); 1862 return widget->webwidget();
1861 } 1863 }
1862 1864
1863 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu( 1865 WebExternalPopupMenu* RenderViewImpl::createExternalPopupMenu(
1864 const WebPopupMenuInfo& popup_menu_info, 1866 const WebPopupMenuInfo& popup_menu_info,
1865 WebExternalPopupMenuClient* popup_menu_client) { 1867 WebExternalPopupMenuClient* popup_menu_client) {
(...skipping 3644 matching lines...) Expand 10 before | Expand all | Expand 10 after
5510 for (size_t i = 0; i < icon_urls.size(); i++) { 5512 for (size_t i = 0; i < icon_urls.size(); i++) {
5511 WebURL url = icon_urls[i].iconURL(); 5513 WebURL url = icon_urls[i].iconURL();
5512 if (!url.isEmpty()) 5514 if (!url.isEmpty())
5513 urls.push_back(FaviconURL(url, 5515 urls.push_back(FaviconURL(url,
5514 ToFaviconType(icon_urls[i].iconType()))); 5516 ToFaviconType(icon_urls[i].iconType())));
5515 } 5517 }
5516 SendUpdateFaviconURL(urls); 5518 SendUpdateFaviconURL(urls);
5517 } 5519 }
5518 5520
5519 } // namespace content 5521 } // 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