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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_manager_impl.cc

Issue 11028019: Browser plugin: Implement loadRedirect event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 8 years, 2 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/renderer/browser_plugin/browser_plugin_manager_impl.h" 5 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h"
6 6
7 #include "content/common/browser_plugin_messages.h" 7 #include "content/common/browser_plugin_messages.h"
8 #include "content/renderer/browser_plugin/browser_plugin.h" 8 #include "content/renderer/browser_plugin/browser_plugin.h"
9 #include "content/renderer/render_thread_impl.h" 9 #include "content/renderer/render_thread_impl.h"
10 10
(...skipping 25 matching lines...) Expand all
36 bool handled = true; 36 bool handled = true;
37 IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message) 37 IPC_BEGIN_MESSAGE_MAP(BrowserPluginManagerImpl, message)
38 IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdateRect, OnUpdateRect) 38 IPC_MESSAGE_HANDLER(BrowserPluginMsg_UpdateRect, OnUpdateRect)
39 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestCrashed, OnGuestCrashed) 39 IPC_MESSAGE_HANDLER(BrowserPluginMsg_GuestCrashed, OnGuestCrashed)
40 IPC_MESSAGE_HANDLER(BrowserPluginMsg_DidNavigate, OnDidNavigate) 40 IPC_MESSAGE_HANDLER(BrowserPluginMsg_DidNavigate, OnDidNavigate)
41 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus) 41 IPC_MESSAGE_HANDLER(BrowserPluginMsg_AdvanceFocus, OnAdvanceFocus)
42 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, 42 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents,
43 OnShouldAcceptTouchEvents) 43 OnShouldAcceptTouchEvents)
44 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) 44 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart)
45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) 45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort)
46 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect)
46 IPC_MESSAGE_UNHANDLED(handled = false) 47 IPC_MESSAGE_UNHANDLED(handled = false)
47 IPC_END_MESSAGE_MAP() 48 IPC_END_MESSAGE_MAP()
48 return handled; 49 return handled;
49 } 50 }
50 51
51 void BrowserPluginManagerImpl::OnUpdateRect( 52 void BrowserPluginManagerImpl::OnUpdateRect(
52 int instance_id, 53 int instance_id,
53 int message_id, 54 int message_id,
54 const BrowserPluginMsg_UpdateRect_Params& params) { 55 const BrowserPluginMsg_UpdateRect_Params& params) {
55 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 56 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 void BrowserPluginManagerImpl::OnLoadAbort(int instance_id, 96 void BrowserPluginManagerImpl::OnLoadAbort(int instance_id,
96 const GURL& url, 97 const GURL& url,
97 bool is_top_level, 98 bool is_top_level,
98 const std::string& type) { 99 const std::string& type) {
99 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 100 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
100 if (plugin) 101 if (plugin)
101 plugin->LoadAbort(url, is_top_level, type); 102 plugin->LoadAbort(url, is_top_level, type);
102 } 103 }
103 104
105 void BrowserPluginManagerImpl::OnLoadRedirect(int instance_id,
106 const GURL& old_url,
107 const GURL& new_url,
108 bool is_top_level) {
109 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
110 if (plugin)
111 plugin->LoadRedirect(old_url, new_url, is_top_level);
112 }
113
104 } // namespace content 114 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager_impl.h ('k') | content/test/data/browser_plugin_embedder.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698