OLD | NEW |
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 } |
OLD | NEW |