OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 5665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5676 IPC::PlatformFileForTransit file_for_transit, | 5676 IPC::PlatformFileForTransit file_for_transit, |
5677 int message_id) { | 5677 int message_id) { |
5678 pepper_delegate_.OnAsyncFileOpened( | 5678 pepper_delegate_.OnAsyncFileOpened( |
5679 error_code, | 5679 error_code, |
5680 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), | 5680 IPC::PlatformFileForTransitToPlatformFile(file_for_transit), |
5681 message_id); | 5681 message_id); |
5682 } | 5682 } |
5683 | 5683 |
5684 #if defined(OS_MACOSX) | 5684 #if defined(OS_MACOSX) |
5685 void RenderView::OnSelectPopupMenuItem(int selected_index) { | 5685 void RenderView::OnSelectPopupMenuItem(int selected_index) { |
| 5686 if (external_popup_menu_ == NULL) { |
| 5687 // Crash reports from the field indicate that we can be notified with a |
| 5688 // NULL external popup menu (we probably get notified twice). |
| 5689 // If you hit this please file a bug against jcivelli and include the page |
| 5690 // and steps to repro. |
| 5691 NOTREACHED(); |
| 5692 return; |
| 5693 } |
5686 external_popup_menu_->DidSelectItem(selected_index); | 5694 external_popup_menu_->DidSelectItem(selected_index); |
5687 external_popup_menu_.reset(); | 5695 external_popup_menu_.reset(); |
5688 } | 5696 } |
5689 #endif | 5697 #endif |
5690 | 5698 |
5691 void RenderView::AddErrorToRootConsole(const string16& message) { | 5699 void RenderView::AddErrorToRootConsole(const string16& message) { |
5692 if (webview() && webview()->mainFrame()) { | 5700 if (webview() && webview()->mainFrame()) { |
5693 webview()->mainFrame()->addMessageToConsole( | 5701 webview()->mainFrame()->addMessageToConsole( |
5694 WebConsoleMessage(WebConsoleMessage::LevelError, message)); | 5702 WebConsoleMessage(WebConsoleMessage::LevelError, message)); |
5695 } | 5703 } |
5696 } | 5704 } |
OLD | NEW |