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

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

Issue 10941042: Browser plugin: Implement loadStart and loadAbort events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed extra space 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 23 matching lines...) Expand all
34 const IPC::Message& message) { 34 const IPC::Message& message) {
35 DCHECK(CalledOnValidThread()); 35 DCHECK(CalledOnValidThread());
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)
45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort)
44 IPC_MESSAGE_UNHANDLED(handled = false) 46 IPC_MESSAGE_UNHANDLED(handled = false)
45 IPC_END_MESSAGE_MAP() 47 IPC_END_MESSAGE_MAP()
46 return handled; 48 return handled;
47 } 49 }
48 50
49 void BrowserPluginManagerImpl::OnUpdateRect( 51 void BrowserPluginManagerImpl::OnUpdateRect(
50 int instance_id, 52 int instance_id,
51 int message_id, 53 int message_id,
52 const BrowserPluginMsg_UpdateRect_Params& params) { 54 const BrowserPluginMsg_UpdateRect_Params& params) {
53 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 55 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
(...skipping 21 matching lines...) Expand all
75 plugin->AdvanceFocus(reverse); 77 plugin->AdvanceFocus(reverse);
76 } 78 }
77 79
78 void BrowserPluginManagerImpl::OnShouldAcceptTouchEvents(int instance_id, 80 void BrowserPluginManagerImpl::OnShouldAcceptTouchEvents(int instance_id,
79 bool accept) { 81 bool accept) {
80 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 82 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
81 if (plugin) 83 if (plugin)
82 plugin->SetAcceptTouchEvents(accept); 84 plugin->SetAcceptTouchEvents(accept);
83 } 85 }
84 86
87 void BrowserPluginManagerImpl::OnLoadStart(int instance_id,
88 const GURL& url,
89 bool is_top_level) {
90 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
91 if (plugin)
92 plugin->LoadStart(url, is_top_level);
93 }
94
95 void BrowserPluginManagerImpl::OnLoadAbort(int instance_id,
96 const GURL& url,
97 bool is_top_level,
98 const std::string& type) {
99 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
100 if (plugin)
101 plugin->LoadAbort(url, is_top_level, type);
102 }
103
85 } // namespace content 104 } // 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