OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 NotificationType::EXTENSION_POPUP_VIEW_READY, | 422 NotificationType::EXTENSION_POPUP_VIEW_READY, |
423 Source<Profile>(profile_), | 423 Source<Profile>(profile_), |
424 Details<ExtensionHost>(this)); | 424 Details<ExtensionHost>(this)); |
425 } | 425 } |
426 } | 426 } |
427 | 427 |
428 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, | 428 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, |
429 const std::wstring& default_prompt, | 429 const std::wstring& default_prompt, |
430 const GURL& frame_url, | 430 const GURL& frame_url, |
431 const int flags, | 431 const int flags, |
| 432 const bool unload_handler_being_run, |
432 IPC::Message* reply_msg, | 433 IPC::Message* reply_msg, |
433 bool* did_suppress_message) { | 434 bool* did_suppress_message) { |
434 *did_suppress_message = false; | 435 *did_suppress_message = false; |
435 // Unlike for page alerts, navigations aren't a good signal for when to | 436 // Unlike for page alerts, navigations aren't a good signal for when to |
436 // resume showing alerts, so we can't reasonably stop showing them even if | 437 // resume showing alerts, so we can't reasonably stop showing them even if |
437 // the extension is spammy. | 438 // the extension is spammy. |
438 RunJavascriptMessageBox(profile_, this, frame_url, flags, message, | 439 RunJavascriptMessageBox(profile_, this, frame_url, flags, message, |
439 default_prompt, false, reply_msg); | 440 default_prompt, false, reply_msg); |
440 } | 441 } |
441 | 442 |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 } | 814 } |
814 return window_id; | 815 return window_id; |
815 } | 816 } |
816 | 817 |
817 void ExtensionHost::OnRunFileChooser( | 818 void ExtensionHost::OnRunFileChooser( |
818 const ViewHostMsg_RunFileChooser_Params& params) { | 819 const ViewHostMsg_RunFileChooser_Params& params) { |
819 if (file_select_helper_.get() == NULL) | 820 if (file_select_helper_.get() == NULL) |
820 file_select_helper_.reset(new FileSelectHelper(profile())); | 821 file_select_helper_.reset(new FileSelectHelper(profile())); |
821 file_select_helper_->RunFileChooser(render_view_host_, params); | 822 file_select_helper_->RunFileChooser(render_view_host_, params); |
822 } | 823 } |
OLD | NEW |