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

Side by Side Diff: ceee/ie/plugin/bho/browser_helper_object.h

Issue 5647001: Use the RPC channel to set the ID <-> handle mapping.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « ceee/ie/common/constants.cc ('k') | ceee/ie/plugin/bho/browser_helper_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // IE browser helper object implementation. 5 // IE browser helper object implementation.
6 #ifndef CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_ 6 #ifndef CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_
7 #define CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_ 7 #define CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_
8 8
9 #include <atlbase.h> 9 #include <atlbase.h>
10 #include <atlcom.h> 10 #include <atlcom.h>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 // Accessor so that we can mock it in unit tests. 256 // Accessor so that we can mock it in unit tests.
257 virtual TabEventsFunnel& tab_events_funnel() { return tab_events_funnel_; } 257 virtual TabEventsFunnel& tab_events_funnel() { return tab_events_funnel_; }
258 258
259 // Accessor so that we can mock it in unit tests. 259 // Accessor so that we can mock it in unit tests.
260 virtual IEventSender* broker_client() { return &broker_client_queue_; } 260 virtual IEventSender* broker_client() { return &broker_client_queue_; }
261 261
262 // Accessor so that we can mock it in unit tests. 262 // Accessor so that we can mock it in unit tests.
263 virtual BrokerRpcClient& broker_rpc() { return broker_rpc_; } 263 virtual BrokerRpcClient& broker_rpc() { return broker_rpc_; }
264 264
265 // Fires the private message to map a tab id to its associated tab handle.
266 virtual HRESULT FireMapTabIdToHandle();
267
268 // Fires the private message to map a tool band id to its associated tab
Jói 2010/12/04 20:41:49 nit: tool band -> toolband
269 // handle.
270 virtual HRESULT FireMapToolbandIdToHandle(int toolband_id);
271
265 // Fires the tab.onCreated event via the tab event funnel. 272 // Fires the tab.onCreated event via the tab event funnel.
266 virtual void FireOnCreatedEvent(BSTR url); 273 virtual void FireOnCreatedEvent(BSTR url);
267 274
268 // Fires the tab.onUpdated event via the tab event funnel. 275 // Fires the tab.onUpdated event via the tab event funnel.
269 virtual void FireOnUpdatedEvent(BSTR url, READYSTATE ready_state); 276 virtual void FireOnUpdatedEvent(BSTR url, READYSTATE ready_state);
270 277
271 // Fires the tab.onRemoved event via the tab event funnel. 278 // Fires the tab.onRemoved event via the tab event funnel.
272 virtual void FireOnRemovedEvent(); 279 virtual void FireOnRemovedEvent();
273 280
274 // Fires the private message to unmap a tab to its BHO. 281 // Fires the private message to unmap a tab to its BHO.
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 return bho_->SendEventToBroker(event_name, event_args); 433 return bho_->SendEventToBroker(event_name, event_args);
427 } 434 }
428 return S_OK; 435 return S_OK;
429 } 436 }
430 437
431 private: 438 private:
432 BrowserHelperObject* bho_; 439 BrowserHelperObject* bho_;
433 DISALLOW_COPY_AND_ASSIGN(BrokerEventQueue); 440 DISALLOW_COPY_AND_ASSIGN(BrokerEventQueue);
434 }; 441 };
435 442
443 // This synchronously send the association between the given ID and our
444 // current tab handle using the given event name.
445 HRESULT SendIdMappingToBroker(const char* event_name, int id);
446
436 // This either calls its Impl or queues the call for later, when we have a 447 // This either calls its Impl or queues the call for later, when we have a
437 // tab_id. 448 // tab_id.
438 HRESULT SendEventToBroker(const char* event_name, const char* event_args); 449 HRESULT SendEventToBroker(const char* event_name, const char* event_args);
439 450
440 // Sends the event to the broker, for real, without delay, right now. 451 // Sends the event to the broker, for real, without delay, right now.
441 HRESULT SendEventToBrokerImpl(const std::string& event_name, 452 HRESULT SendEventToBrokerImpl(const std::string& event_name,
442 const std::string& event_args); 453 const std::string& event_args);
443 454
444 // List of calls to send to the broker. 455 // List of calls to send to the broker.
445 typedef std::deque<Task*> DeferredCallListType; 456 typedef std::deque<Task*> DeferredCallListType;
446 DeferredCallListType deferred_events_call_; 457 DeferredCallListType deferred_events_call_;
447 458
448 // This is passed to every funnel so they use the queue for sending events. 459 // This is passed to every funnel so they use the queue for sending events.
449 BrokerEventQueue broker_client_queue_; 460 BrokerEventQueue broker_client_queue_;
450 461
451 // Used to dispatch tab events back to Chrome. 462 // Used to dispatch tab events back to Chrome.
452 TabEventsFunnel tab_events_funnel_; 463 TabEventsFunnel tab_events_funnel_;
453 }; 464 };
454 465
455 #endif // CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_ 466 #endif // CEEE_IE_PLUGIN_BHO_BROWSER_HELPER_OBJECT_H_
OLDNEW
« no previous file with comments | « ceee/ie/common/constants.cc ('k') | ceee/ie/plugin/bho/browser_helper_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698