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

Side by Side Diff: ceee/ie/broker/api_dispatcher.h

Issue 4989002: Firing event to broker without worker thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « no previous file | ceee/ie/broker/api_dispatcher.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 // Dispatcher and registry for Chrome Extension APIs. 5 // Dispatcher and registry for Chrome Extension APIs.
6 6
7 #ifndef CEEE_IE_BROKER_API_DISPATCHER_H_ 7 #ifndef CEEE_IE_BROKER_API_DISPATCHER_H_
8 #define CEEE_IE_BROKER_API_DISPATCHER_H_ 8 #define CEEE_IE_BROKER_API_DISPATCHER_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 24 matching lines...) Expand all
35 // @param message_text The raw JSON-encoded text of the API request over 35 // @param message_text The raw JSON-encoded text of the API request over
36 // the automation interface. 36 // the automation interface.
37 // @param response Where to return the JSON-encoded response. 37 // @param response Where to return the JSON-encoded response.
38 virtual void HandleApiRequest(BSTR message_text, BSTR* response); 38 virtual void HandleApiRequest(BSTR message_text, BSTR* response);
39 39
40 // Fire the given event message to Chrome Frame and potentially use it 40 // Fire the given event message to Chrome Frame and potentially use it
41 // to complete pending extension API execution. 41 // to complete pending extension API execution.
42 // 42 //
43 // @param event_name The name of the event to fire. 43 // @param event_name The name of the event to fire.
44 // @param event_args The JSON encoded event arguments. 44 // @param event_args The JSON encoded event arguments.
45 virtual void FireEvent(BSTR event_name, BSTR event_args); 45 virtual void FireEvent(const char* event_name, const char* event_args);
46 46
47 // This class holds on the result and can be derived from to generate results 47 // This class holds on the result and can be derived from to generate results
48 // that are either specific to tabs or windows for example. 48 // that are either specific to tabs or windows for example.
49 class InvocationResult { 49 class InvocationResult {
50 public: 50 public:
51 static const int kNoRequestId = -1; 51 static const int kNoRequestId = -1;
52 explicit InvocationResult(int request_id) 52 explicit InvocationResult(int request_id)
53 : request_id_(request_id) { 53 : request_id_(request_id) {
54 } 54 }
55 virtual ~InvocationResult(); 55 virtual ~InvocationResult();
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 virtual void CallRealPostError(const std::string& error) { 368 virtual void CallRealPostError(const std::string& error) {
369 InvocationBase::PostError(error); 369 InvocationBase::PostError(error);
370 } 370 }
371 371
372 scoped_ptr<ListValue> result_accumulator_; 372 scoped_ptr<ListValue> result_accumulator_;
373 std::list<std::string> error_accumulator_; 373 std::list<std::string> error_accumulator_;
374 }; 374 };
375 375
376 376
377 #endif // CEEE_IE_BROKER_API_DISPATCHER_H_ 377 #endif // CEEE_IE_BROKER_API_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | ceee/ie/broker/api_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698