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

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

Issue 10695124: Add support for triggering Android intents based on content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) 909 IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeChanged, OnFocusedNodeChanged)
910 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole) 910 IPC_MESSAGE_HANDLER(ViewHostMsg_AddMessageToConsole, OnAddMessageToConsole)
911 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK) 911 IPC_MESSAGE_HANDLER(ViewHostMsg_ShouldClose_ACK, OnMsgShouldCloseACK)
912 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnMsgClosePageACK) 912 IPC_MESSAGE_HANDLER(ViewHostMsg_ClosePage_ACK, OnMsgClosePageACK)
913 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged) 913 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionChanged, OnMsgSelectionChanged)
914 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, 914 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged,
915 OnMsgSelectionBoundsChanged) 915 OnMsgSelectionBoundsChanged)
916 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse) 916 IPC_MESSAGE_HANDLER(ViewHostMsg_ScriptEvalResponse, OnScriptEvalResponse)
917 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL) 917 IPC_MESSAGE_HANDLER(ViewHostMsg_DidZoomURL, OnDidZoomURL)
918 IPC_MESSAGE_HANDLER(ViewHostMsg_MediaNotification, OnMediaNotification) 918 IPC_MESSAGE_HANDLER(ViewHostMsg_MediaNotification, OnMediaNotification)
919 #if defined(OS_ANDROID)
920 IPC_MESSAGE_HANDLER(ViewHostMsg_StartContentIntent,
921 OnStartContentIntent);
jam 2012/07/10 21:06:16 are you sure this doesn't fit on one line? also g
Leandro GraciĆ” Gil 2012/07/11 10:55:43 Done.
922 #endif
919 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, 923 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
920 OnRequestDesktopNotificationPermission) 924 OnRequestDesktopNotificationPermission)
921 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 925 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
922 OnShowDesktopNotification) 926 OnShowDesktopNotification)
923 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 927 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
924 OnCancelDesktopNotification) 928 OnCancelDesktopNotification)
925 #if defined(OS_MACOSX) 929 #if defined(OS_MACOSX)
926 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) 930 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
927 #endif 931 #endif
928 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 932 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 } 1788 }
1785 1789
1786 if (blocker) 1790 if (blocker)
1787 power_save_blockers_[player_cookie] = blocker; 1791 power_save_blockers_[player_cookie] = blocker;
1788 } else { 1792 } else {
1789 delete power_save_blockers_[player_cookie]; 1793 delete power_save_blockers_[player_cookie];
1790 power_save_blockers_.erase(player_cookie); 1794 power_save_blockers_.erase(player_cookie);
1791 } 1795 }
1792 } 1796 }
1793 1797
1798 #if defined(OS_ANDROID)
1799 void RenderViewHostImpl::OnStartContentIntent(const GURL& content_url) {
1800 if (GetView())
1801 GetView()->StartContentIntent(content_url);
1802 }
1803 #endif
1804
1794 void RenderViewHostImpl::OnRequestDesktopNotificationPermission( 1805 void RenderViewHostImpl::OnRequestDesktopNotificationPermission(
1795 const GURL& source_origin, int callback_context) { 1806 const GURL& source_origin, int callback_context) {
1796 content::GetContentClient()->browser()->RequestDesktopNotificationPermission( 1807 content::GetContentClient()->browser()->RequestDesktopNotificationPermission(
1797 source_origin, callback_context, GetProcess()->GetID(), GetRoutingID()); 1808 source_origin, callback_context, GetProcess()->GetID(), GetRoutingID());
1798 } 1809 }
1799 1810
1800 void RenderViewHostImpl::OnShowDesktopNotification( 1811 void RenderViewHostImpl::OnShowDesktopNotification(
1801 const content::ShowDesktopNotificationHostMsgParams& params) { 1812 const content::ShowDesktopNotificationHostMsgParams& params) {
1802 // Disallow HTML notifications from javascript: and file: schemes as this 1813 // Disallow HTML notifications from javascript: and file: schemes as this
1803 // allows unwanted cross-domain access. 1814 // allows unwanted cross-domain access.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1855 // can cause navigations to be ignored in OnMsgNavigate. 1866 // can cause navigations to be ignored in OnMsgNavigate.
1856 is_waiting_for_beforeunload_ack_ = false; 1867 is_waiting_for_beforeunload_ack_ = false;
1857 is_waiting_for_unload_ack_ = false; 1868 is_waiting_for_unload_ack_ = false;
1858 } 1869 }
1859 1870
1860 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1871 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1861 STLDeleteValues(&power_save_blockers_); 1872 STLDeleteValues(&power_save_blockers_);
1862 } 1873 }
1863 1874
1864 } // namespace content 1875 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698