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

Side by Side Diff: ceee/ie/broker/broker.cc

Issue 4508002: COM replaced with RPC for firing events in broker. (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/broker.gyp » ('j') | ceee/ie/broker/broker.gyp » ('J')
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 // ICeeeBroker implementation 5 // ICeeeBroker implementation
6 6
7 #include "ceee/ie/broker/broker.h" 7 #include "ceee/ie/broker/broker.h"
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ceee/ie/broker/api_dispatcher.h" 10 #include "ceee/ie/broker/api_dispatcher.h"
11 #include "ceee/ie/broker/chrome_postman.h" 11 #include "ceee/ie/broker/chrome_postman.h"
12 #include "ceee/ie/broker/executors_manager.h" 12 #include "ceee/ie/broker/executors_manager.h"
13 #include "ceee/ie/common/ceee_module_util.h" 13 #include "ceee/ie/common/ceee_module_util.h"
14 14
15 15
16 HRESULT CeeeBroker::FinalConstruct() { 16 HRESULT CeeeBroker::FinalConstruct() {
17 // So that we get a pointer to the ExecutorsManager and let tests override it. 17 // So that we get a pointer to the ExecutorsManager and let tests override it.
18 executors_manager_ = Singleton<ExecutorsManager, 18 executors_manager_ = Singleton<ExecutorsManager,
19 ExecutorsManager::SingletonTraits>::get(); 19 ExecutorsManager::SingletonTraits>::get();
20 api_dispatcher_ = ProductionApiDispatcher::get(); 20 api_dispatcher_ = ProductionApiDispatcher::get();
21 return S_OK; 21 return S_OK;
22 } 22 }
23 23
24 void CeeeBroker::OnAddConnection(bool first_lock) { 24 void CeeeBroker::OnAddConnection(bool first_lock) {
Sigurður Ásgeirsson 2010/11/11 19:30:35 Do we still need this?
Vitaly Buka corp 2010/11/11 23:12:10 Done.
25 if (first_lock)
26 ceee_module_util::LockModule();
27 } 25 }
28 26
29 void CeeeBroker::OnReleaseConnection(bool last_unlock, 27 void CeeeBroker::OnReleaseConnection(bool last_unlock,
30 bool last_unlock_releases) { 28 bool last_unlock_releases) {
31 if (last_unlock)
32 ceee_module_util::UnlockModule();
33 IExternalConnectionImpl<CeeeBroker>::OnReleaseConnection( 29 IExternalConnectionImpl<CeeeBroker>::OnReleaseConnection(
34 last_unlock, last_unlock_releases); 30 last_unlock, last_unlock_releases);
35 } 31 }
36 32
37 STDMETHODIMP CeeeBroker::Execute(BSTR function, BSTR* response) { 33 STDMETHODIMP CeeeBroker::Execute(BSTR function, BSTR* response) {
38 // This is DEPRECATED and we should use ChromePostman (see FireEvent). 34 // This is DEPRECATED and we should use ChromePostman (see FireEvent).
39 api_dispatcher_->HandleApiRequest(function, response); 35 api_dispatcher_->HandleApiRequest(function, response);
40 return S_OK; 36 return S_OK;
41 } 37 }
42 38
(...skipping 20 matching lines...) Expand all
63 } 59 }
64 60
65 STDMETHODIMP CeeeBroker::SetTabIdForHandle(long tab_id, 61 STDMETHODIMP CeeeBroker::SetTabIdForHandle(long tab_id,
66 CeeeWindowHandle handle) { 62 CeeeWindowHandle handle) {
67 // TODO(mad@chromium.org): Add security check here. 63 // TODO(mad@chromium.org): Add security check here.
68 DCHECK(tab_id != kInvalidChromeSessionId && 64 DCHECK(tab_id != kInvalidChromeSessionId &&
69 handle != reinterpret_cast<CeeeWindowHandle>(INVALID_HANDLE_VALUE)); 65 handle != reinterpret_cast<CeeeWindowHandle>(INVALID_HANDLE_VALUE));
70 executors_manager_->SetTabIdForHandle(tab_id, reinterpret_cast<HWND>(handle)); 66 executors_manager_->SetTabIdForHandle(tab_id, reinterpret_cast<HWND>(handle));
71 return S_OK; 67 return S_OK;
72 } 68 }
OLDNEW
« no previous file with comments | « no previous file | ceee/ie/broker/broker.gyp » ('j') | ceee/ie/broker/broker.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698