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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 50067: Fix renderer crash when a file chooser is closed after navigating away from... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2590 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 2601
2602 void RenderView::OnInstallMissingPlugin() { 2602 void RenderView::OnInstallMissingPlugin() {
2603 // This could happen when the first default plugin is deleted. 2603 // This could happen when the first default plugin is deleted.
2604 if (first_default_plugin_ == NULL) 2604 if (first_default_plugin_ == NULL)
2605 return; 2605 return;
2606 first_default_plugin_->InstallMissingPlugin(); 2606 first_default_plugin_->InstallMissingPlugin();
2607 } 2607 }
2608 2608
2609 void RenderView::OnFileChooserResponse( 2609 void RenderView::OnFileChooserResponse(
2610 const std::vector<std::wstring>& file_names) { 2610 const std::vector<std::wstring>& file_names) {
2611 // This could happen if we navigated to a different page before the user
2612 // closed the chooser.
2613 if (!file_chooser_.get())
2614 return;
2615
2611 file_chooser_->OnFileChoose(file_names); 2616 file_chooser_->OnFileChoose(file_names);
2612 file_chooser_.reset(); 2617 file_chooser_.reset();
2613 } 2618 }
2614 2619
2615 void RenderView::OnEnableViewSourceMode() { 2620 void RenderView::OnEnableViewSourceMode() {
2616 if (!webview()) 2621 if (!webview())
2617 return; 2622 return;
2618 WebFrame* main_frame = webview()->GetMainFrame(); 2623 WebFrame* main_frame = webview()->GetMainFrame();
2619 if (!main_frame) 2624 if (!main_frame)
2620 return; 2625 return;
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2920 DCHECK(audio_renderers_.Lookup(stream_id) != NULL); 2925 DCHECK(audio_renderers_.Lookup(stream_id) != NULL);
2921 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right)); 2926 Send(new ViewHostMsg_SetAudioVolume(routing_id_, stream_id, left, right));
2922 } 2927 }
2923 2928
2924 void RenderView::OnResize(const gfx::Size& new_size, 2929 void RenderView::OnResize(const gfx::Size& new_size,
2925 const gfx::Rect& resizer_rect) { 2930 const gfx::Rect& resizer_rect) {
2926 if (webview()) 2931 if (webview())
2927 webview()->HideAutofillPopup(); 2932 webview()->HideAutofillPopup();
2928 RenderWidget::OnResize(new_size, resizer_rect); 2933 RenderWidget::OnResize(new_size, resizer_rect);
2929 } 2934 }
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