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

Side by Side Diff: chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc

Issue 9271054: Send replies to sync IPCs from swapped out renderers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Send JS replies to right RVH. Created 8 years, 10 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 | content/browser/javascript_dialogs.h » ('j') | 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) 2011 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 "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h" 5 #include "chrome/browser/ui/app_modal_dialogs/js_modal_dialog.h"
6 6
7 #include "chrome/browser/browser_shutdown.h" 7 #include "chrome/browser/browser_shutdown.h"
8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h" 8 #include "chrome/browser/ui/app_modal_dialogs/native_app_modal_dialog.h"
9 #include "ui/base/text/text_elider.h" 9 #include "ui/base/text/text_elider.h"
10 10
11 namespace { 11 namespace {
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 override_prompt_text_ = override_prompt_text; 131 override_prompt_text_ = override_prompt_text;
132 use_override_prompt_text_ = true; 132 use_override_prompt_text_ = true;
133 } 133 }
134 134
135 void JavaScriptAppModalDialog::NotifyDelegate(bool success, 135 void JavaScriptAppModalDialog::NotifyDelegate(bool success,
136 const string16& user_input, 136 const string16& user_input,
137 bool suppress_js_messages) { 137 bool suppress_js_messages) {
138 if (!valid_) 138 if (!valid_)
139 return; 139 return;
140 140
141 delegate()->OnDialogClosed(reply_msg_, success, user_input); 141 // TODO(creis): Should pass the actual RVH that sent the message.
142 delegate()->OnDialogClosed(NULL, reply_msg_, success, user_input);
142 143
143 extra_data_->last_javascript_message_dismissal_ = base::TimeTicks::Now(); 144 extra_data_->last_javascript_message_dismissal_ = base::TimeTicks::Now();
144 extra_data_->suppress_javascript_messages_ = suppress_js_messages; 145 extra_data_->suppress_javascript_messages_ = suppress_js_messages;
145 146
146 // On Views, we can end up coming through this code path twice :(. 147 // On Views, we can end up coming through this code path twice :(.
147 // See crbug.com/63732. 148 // See crbug.com/63732.
148 valid_ = false; 149 valid_ = false;
149 } 150 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/javascript_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698