Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 10436010: Multi-select <select> in 'external popup window' (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after
1524 #if defined(OS_MACOSX) 1524 #if defined(OS_MACOSX)
1525 void RenderViewHostImpl::DidSelectPopupMenuItem(int selected_index) { 1525 void RenderViewHostImpl::DidSelectPopupMenuItem(int selected_index) {
1526 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), selected_index)); 1526 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), selected_index));
1527 } 1527 }
1528 1528
1529 void RenderViewHostImpl::DidCancelPopupMenu() { 1529 void RenderViewHostImpl::DidCancelPopupMenu() {
1530 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), -1)); 1530 Send(new ViewMsg_SelectPopupMenuItem(GetRoutingID(), -1));
1531 } 1531 }
1532 #endif 1532 #endif
1533 1533
1534 #if defined(OS_ANDROID)
1535 void RenderViewHostImpl::DidSelectPopupMenuItems(
1536 const std::vector<int>& selected_indices) {
1537 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), false,
1538 selected_indices));
1539 }
1540
1541 void RenderViewHostImpl::DidCancelPopupMenu() {
1542 Send(new ViewMsg_SelectPopupMenuItems(GetRoutingID(), true,
1543 std::vector<int>()));
1544 }
1545 #endif
1546
1534 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) { 1547 void RenderViewHostImpl::SendOrientationChangeEvent(int orientation) {
1535 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation)); 1548 Send(new ViewMsg_OrientationChangeEvent(GetRoutingID(), orientation));
1536 } 1549 }
1537 1550
1538 void RenderViewHostImpl::ToggleSpeechInput() { 1551 void RenderViewHostImpl::ToggleSpeechInput() {
1539 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID())); 1552 Send(new InputTagSpeechMsg_ToggleSpeechInput(GetRoutingID()));
1540 } 1553 }
1541 1554
1542 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy, 1555 void RenderViewHostImpl::FilterURL(ChildProcessSecurityPolicyImpl* policy,
1543 int renderer_id, 1556 int renderer_id,
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 1792
1780 content::GetContentClient()->browser()->ShowDesktopNotification( 1793 content::GetContentClient()->browser()->ShowDesktopNotification(
1781 params, GetProcess()->GetID(), GetRoutingID(), false); 1794 params, GetProcess()->GetID(), GetRoutingID(), false);
1782 } 1795 }
1783 1796
1784 void RenderViewHostImpl::OnCancelDesktopNotification(int notification_id) { 1797 void RenderViewHostImpl::OnCancelDesktopNotification(int notification_id) {
1785 content::GetContentClient()->browser()->CancelDesktopNotification( 1798 content::GetContentClient()->browser()->CancelDesktopNotification(
1786 GetProcess()->GetID(), GetRoutingID(), notification_id); 1799 GetProcess()->GetID(), GetRoutingID(), notification_id);
1787 } 1800 }
1788 1801
1789 #if defined(OS_MACOSX) 1802 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1790 void RenderViewHostImpl::OnMsgShowPopup( 1803 void RenderViewHostImpl::OnMsgShowPopup(
1791 const ViewHostMsg_ShowPopup_Params& params) { 1804 const ViewHostMsg_ShowPopup_Params& params) {
1792 PopupMenuHelper popup_menu_helper(this); 1805 RenderViewHostDelegateView* view = delegate_->GetDelegateView();
1793 popup_menu_helper.ShowPopupMenu(params.bounds, params.item_height, 1806 if (view) {
1794 params.item_font_size, params.selected_item, 1807 view->ShowPopupMenu(params.bounds,
1795 params.popup_items, params.right_aligned); 1808 params.item_height,
1809 params.item_font_size,
1810 params.selected_item,
1811 params.popup_items,
1812 params.right_aligned,
1813 params.allow_multiple_selection);
1814 }
1796 } 1815 }
1797 #endif 1816 #endif
1798 1817
1799 void RenderViewHostImpl::OnRunFileChooser( 1818 void RenderViewHostImpl::OnRunFileChooser(
1800 const content::FileChooserParams& params) { 1819 const content::FileChooserParams& params) {
1801 delegate_->RunFileChooser(this, params); 1820 delegate_->RunFileChooser(this, params);
1802 } 1821 }
1803 1822
1804 void RenderViewHostImpl::OnDomOperationResponse( 1823 void RenderViewHostImpl::OnDomOperationResponse(
1805 const std::string& json_string, int automation_id) { 1824 const std::string& json_string, int automation_id) {
(...skipping 12 matching lines...) Expand all
1818 // can cause navigations to be ignored in OnMsgNavigate. 1837 // can cause navigations to be ignored in OnMsgNavigate.
1819 is_waiting_for_beforeunload_ack_ = false; 1838 is_waiting_for_beforeunload_ack_ = false;
1820 is_waiting_for_unload_ack_ = false; 1839 is_waiting_for_unload_ack_ = false;
1821 } 1840 }
1822 1841
1823 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1842 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1824 STLDeleteValues(&power_save_blockers_); 1843 STLDeleteValues(&power_save_blockers_);
1825 } 1844 }
1826 1845
1827 } // namespace content 1846 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_view_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698