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

Side by Side Diff: content/public/browser/web_contents_delegate.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, 11 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 | « content/public/browser/render_view_host_delegate.h ('k') | content/test/test_content_client.cc » ('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) 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/public/browser/web_contents_delegate.h" 5 #include "content/public/browser/web_contents_delegate.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "content/browser/javascript_dialogs.h" 10 #include "content/browser/javascript_dialogs.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 const string16& default_prompt_text, 139 const string16& default_prompt_text,
140 IPC::Message* reply_message, 140 IPC::Message* reply_message,
141 bool* did_suppress_message) OVERRIDE { 141 bool* did_suppress_message) OVERRIDE {
142 *did_suppress_message = true; 142 *did_suppress_message = true;
143 } 143 }
144 144
145 virtual void RunBeforeUnloadDialog( 145 virtual void RunBeforeUnloadDialog(
146 JavaScriptDialogDelegate* delegate, 146 JavaScriptDialogDelegate* delegate,
147 const string16& message_text, 147 const string16& message_text,
148 IPC::Message* reply_message) OVERRIDE { 148 IPC::Message* reply_message) OVERRIDE {
149 delegate->OnDialogClosed(reply_message, true, string16()); 149 // TODO(creis): Pass in the RVH that sent the request.
150 delegate->OnDialogClosed(NULL, reply_message, true, string16());
150 } 151 }
151 152
152 virtual void ResetJavaScriptState( 153 virtual void ResetJavaScriptState(
153 JavaScriptDialogDelegate* delegate) OVERRIDE { 154 JavaScriptDialogDelegate* delegate) OVERRIDE {
154 } 155 }
155 private: 156 private:
156 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>; 157 friend struct DefaultSingletonTraits<JavaScriptDialogCreatorStub>;
157 }; 158 };
158 159
159 JavaScriptDialogCreator* WebContentsDelegate::GetJavaScriptDialogCreator() { 160 JavaScriptDialogCreator* WebContentsDelegate::GetJavaScriptDialogCreator() {
(...skipping 24 matching lines...) Expand all
184 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end()); 185 DCHECK(attached_contents_.find(web_contents) == attached_contents_.end());
185 attached_contents_.insert(web_contents); 186 attached_contents_.insert(web_contents);
186 } 187 }
187 188
188 void WebContentsDelegate::Detach(WebContents* web_contents) { 189 void WebContentsDelegate::Detach(WebContents* web_contents) {
189 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end()); 190 DCHECK(attached_contents_.find(web_contents) != attached_contents_.end());
190 attached_contents_.erase(web_contents); 191 attached_contents_.erase(web_contents);
191 } 192 }
192 193
193 } // namespace content 194 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/render_view_host_delegate.h ('k') | content/test/test_content_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698