| 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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh, | 419 void ExtensionHost::DocumentOnLoadCompletedInMainFrame(RenderViewHost* rvh, |
| 420 int32 page_id) { | 420 int32 page_id) { |
| 421 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) { | 421 if (ViewType::EXTENSION_POPUP == GetRenderViewType()) { |
| 422 NotificationService::current()->Notify( | 422 NotificationService::current()->Notify( |
| 423 NotificationType::EXTENSION_POPUP_VIEW_READY, | 423 NotificationType::EXTENSION_POPUP_VIEW_READY, |
| 424 Source<Profile>(profile_), | 424 Source<Profile>(profile_), |
| 425 Details<ExtensionHost>(this)); | 425 Details<ExtensionHost>(this)); |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 | 428 |
| 429 void ExtensionHost::RunJavaScriptMessage(const std::wstring& message, | 429 void ExtensionHost::RunJavaScriptMessage(const RenderViewHost* rvh, |
| 430 const std::wstring& message, |
| 430 const std::wstring& default_prompt, | 431 const std::wstring& default_prompt, |
| 431 const GURL& frame_url, | 432 const GURL& frame_url, |
| 432 const int flags, | 433 const int flags, |
| 433 IPC::Message* reply_msg, | 434 IPC::Message* reply_msg, |
| 434 bool* did_suppress_message) { | 435 bool* did_suppress_message) { |
| 435 base::TimeDelta time_since_last_message( | 436 base::TimeDelta time_since_last_message( |
| 436 base::TimeTicks::Now() - last_javascript_message_dismissal_); | 437 base::TimeTicks::Now() - last_javascript_message_dismissal_); |
| 437 | 438 |
| 438 *did_suppress_message = suppress_javascript_messages_; | 439 *did_suppress_message = suppress_javascript_messages_; |
| 439 if (!suppress_javascript_messages_) { | 440 if (!suppress_javascript_messages_) { |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 return window_id; | 835 return window_id; |
| 835 } | 836 } |
| 836 | 837 |
| 837 void ExtensionHost::OnRunFileChooser( | 838 void ExtensionHost::OnRunFileChooser( |
| 838 const ViewHostMsg_RunFileChooser_Params& params) { | 839 const ViewHostMsg_RunFileChooser_Params& params) { |
| 839 if (file_select_helper_.get() == NULL) | 840 if (file_select_helper_.get() == NULL) |
| 840 file_select_helper_.reset(new FileSelectHelper(profile())); | 841 file_select_helper_.reset(new FileSelectHelper(profile())); |
| 841 file_select_helper_->RunFileChooser(render_view_host_, | 842 file_select_helper_->RunFileChooser(render_view_host_, |
| 842 associated_tab_contents(), params); | 843 associated_tab_contents(), params); |
| 843 } | 844 } |
| OLD | NEW |