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

Side by Side Diff: chrome/browser/extensions/extension_view.cc

Issue 39163: Make JavaScript alerts reflect the URL of the frame they came from, not the... (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
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/extensions/extension_view.h" 5 #include "chrome/browser/extensions/extension_view.h"
6 6
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 8
9 ExtensionView::ExtensionView(const GURL& url, Profile* profile) : 9 ExtensionView::ExtensionView(const GURL& url, Profile* profile) :
10 HWNDHtmlView(url, this, false), profile_(profile) { 10 HWNDHtmlView(url, this, false), profile_(profile) {
11 } 11 }
12 12
13 void ExtensionView::CreatingRenderer() { 13 void ExtensionView::CreatingRenderer() {
14 render_view_host()->AllowExtensionBindings(); 14 render_view_host()->AllowExtensionBindings();
15 } 15 }
16 16
17 WebPreferences ExtensionView::GetWebkitPrefs() { 17 WebPreferences ExtensionView::GetWebkitPrefs() {
18 // TODO(mpcomplete): return some reasonable prefs. 18 // TODO(mpcomplete): return some reasonable prefs.
19 return WebPreferences(); 19 return WebPreferences();
20 } 20 }
21 21
22 void ExtensionView::RunJavaScriptMessage( 22 void ExtensionView::RunJavaScriptMessage(
23 const std::wstring& message, 23 const std::wstring& message,
24 const std::wstring& default_prompt, 24 const std::wstring& default_prompt,
25 const GURL& frame_url,
25 const int flags, 26 const int flags,
26 IPC::Message* reply_msg, 27 IPC::Message* reply_msg,
27 bool* did_suppress_message) { 28 bool* did_suppress_message) {
28 // Automatically cancel the javascript alert (otherwise the renderer hangs 29 // Automatically cancel the javascript alert (otherwise the renderer hangs
29 // indefinitely). 30 // indefinitely).
30 *did_suppress_message = true; 31 *did_suppress_message = true;
31 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L""); 32 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, true, L"");
32 } 33 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_view.h ('k') | chrome/browser/extensions/extension_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698