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

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: nit fixes. 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, OnStartContentIntent)
921 #endif
919 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission, 922 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
920 OnRequestDesktopNotificationPermission) 923 OnRequestDesktopNotificationPermission)
921 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show, 924 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
922 OnShowDesktopNotification) 925 OnShowDesktopNotification)
923 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel, 926 IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Cancel,
924 OnCancelDesktopNotification) 927 OnCancelDesktopNotification)
925 #if defined(OS_MACOSX) 928 #if defined(OS_MACOSX)
926 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) 929 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup)
927 #endif 930 #endif
928 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser) 931 IPC_MESSAGE_HANDLER(ViewHostMsg_RunFileChooser, OnRunFileChooser)
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1784 } 1787 }
1785 1788
1786 if (blocker) 1789 if (blocker)
1787 power_save_blockers_[player_cookie] = blocker; 1790 power_save_blockers_[player_cookie] = blocker;
1788 } else { 1791 } else {
1789 delete power_save_blockers_[player_cookie]; 1792 delete power_save_blockers_[player_cookie];
1790 power_save_blockers_.erase(player_cookie); 1793 power_save_blockers_.erase(player_cookie);
1791 } 1794 }
1792 } 1795 }
1793 1796
1797 #if defined(OS_ANDROID)
1798 void RenderViewHostImpl::OnStartContentIntent(const GURL& content_url) {
1799 if (GetView())
1800 GetView()->StartContentIntent(content_url);
1801 }
1802 #endif
1803
1794 void RenderViewHostImpl::OnRequestDesktopNotificationPermission( 1804 void RenderViewHostImpl::OnRequestDesktopNotificationPermission(
1795 const GURL& source_origin, int callback_context) { 1805 const GURL& source_origin, int callback_context) {
1796 content::GetContentClient()->browser()->RequestDesktopNotificationPermission( 1806 content::GetContentClient()->browser()->RequestDesktopNotificationPermission(
1797 source_origin, callback_context, GetProcess()->GetID(), GetRoutingID()); 1807 source_origin, callback_context, GetProcess()->GetID(), GetRoutingID());
1798 } 1808 }
1799 1809
1800 void RenderViewHostImpl::OnShowDesktopNotification( 1810 void RenderViewHostImpl::OnShowDesktopNotification(
1801 const content::ShowDesktopNotificationHostMsgParams& params) { 1811 const content::ShowDesktopNotificationHostMsgParams& params) {
1802 // Disallow HTML notifications from javascript: and file: schemes as this 1812 // Disallow HTML notifications from javascript: and file: schemes as this
1803 // allows unwanted cross-domain access. 1813 // 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. 1865 // can cause navigations to be ignored in OnMsgNavigate.
1856 is_waiting_for_beforeunload_ack_ = false; 1866 is_waiting_for_beforeunload_ack_ = false;
1857 is_waiting_for_unload_ack_ = false; 1867 is_waiting_for_unload_ack_ = false;
1858 } 1868 }
1859 1869
1860 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1870 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1861 STLDeleteValues(&power_save_blockers_); 1871 STLDeleteValues(&power_save_blockers_);
1862 } 1872 }
1863 1873
1864 } // namespace content 1874 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698