| 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/renderer/render_view.h" | 5 #include "chrome/renderer/render_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4705 | 4705 |
| 4706 void RenderView::OnUpdateWebPreferences(const WebPreferences& prefs) { | 4706 void RenderView::OnUpdateWebPreferences(const WebPreferences& prefs) { |
| 4707 webkit_preferences_ = prefs; | 4707 webkit_preferences_ = prefs; |
| 4708 webkit_preferences_.Apply(webview()); | 4708 webkit_preferences_.Apply(webview()); |
| 4709 } | 4709 } |
| 4710 | 4710 |
| 4711 void RenderView::OnSetAltErrorPageURL(const GURL& url) { | 4711 void RenderView::OnSetAltErrorPageURL(const GURL& url) { |
| 4712 alternate_error_page_url_ = url; | 4712 alternate_error_page_url_ = url; |
| 4713 } | 4713 } |
| 4714 | 4714 |
| 4715 void RenderView::OnCustomContextMenuAction(unsigned action) { | 4715 void RenderView::OnCustomContextMenuAction( |
| 4716 webview()->performCustomContextMenuAction(action); | 4716 const webkit_glue::CustomContextMenuContext& custom_context, |
| 4717 unsigned action) { |
| 4718 if (custom_context.is_pepper_menu) |
| 4719 pepper_delegate_.OnCustomContextMenuAction(custom_context, action); |
| 4720 else |
| 4721 webview()->performCustomContextMenuAction(action); |
| 4717 } | 4722 } |
| 4718 | 4723 |
| 4719 void RenderView::OnTranslatePage(int page_id, | 4724 void RenderView::OnTranslatePage(int page_id, |
| 4720 const std::string& translate_script, | 4725 const std::string& translate_script, |
| 4721 const std::string& source_lang, | 4726 const std::string& source_lang, |
| 4722 const std::string& target_lang) { | 4727 const std::string& target_lang) { |
| 4723 translate_helper_.TranslatePage(page_id, source_lang, target_lang, | 4728 translate_helper_.TranslatePage(page_id, source_lang, target_lang, |
| 4724 translate_script); | 4729 translate_script); |
| 4725 } | 4730 } |
| 4726 | 4731 |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5763 #endif | 5768 #endif |
| 5764 | 5769 |
| 5765 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) { | 5770 void RenderView::OnJavaScriptStressTestControl(int cmd, int param) { |
| 5766 if (cmd == kJavaScriptStressTestSetStressRunType) { | 5771 if (cmd == kJavaScriptStressTestSetStressRunType) { |
| 5767 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); | 5772 v8::Testing::SetStressRunType(static_cast<v8::Testing::StressType>(param)); |
| 5768 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { | 5773 } else if (cmd == kJavaScriptStressTestPrepareStressRun) { |
| 5769 v8::Testing::PrepareStressRun(param); | 5774 v8::Testing::PrepareStressRun(param); |
| 5770 } | 5775 } |
| 5771 } | 5776 } |
| 5772 | 5777 |
| 5773 void RenderView::OnContextMenuClosed() { | 5778 void RenderView::OnContextMenuClosed( |
| 5774 context_menu_node_.reset(); | 5779 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5780 if (custom_context.is_pepper_menu) |
| 5781 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5782 else |
| 5783 context_menu_node_.reset(); |
| 5775 } | 5784 } |
| OLD | NEW |