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

Side by Side Diff: mojo/edk/js/handle.cc

Issue 2418043002: Remove usage of FOR_EACH_OBSERVER macro in mojo (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/edk/js/handle.h" 5 #include "mojo/edk/js/handle.h"
6 6
7 #include "mojo/edk/js/handle_close_observer.h" 7 #include "mojo/edk/js/handle_close_observer.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace edk { 10 namespace edk {
(...skipping 19 matching lines...) Expand all
30 } 30 }
31 31
32 void HandleWrapper::RemoveCloseObserver(HandleCloseObserver* observer) { 32 void HandleWrapper::RemoveCloseObserver(HandleCloseObserver* observer) {
33 close_observers_.RemoveObserver(observer); 33 close_observers_.RemoveObserver(observer);
34 } 34 }
35 35
36 void HandleWrapper::NotifyCloseObservers() { 36 void HandleWrapper::NotifyCloseObservers() {
37 if (!handle_.is_valid()) 37 if (!handle_.is_valid())
38 return; 38 return;
39 39
40 FOR_EACH_OBSERVER(HandleCloseObserver, close_observers_, OnWillCloseHandle()); 40 for (auto& observer : close_observers_)
41 observer.OnWillCloseHandle();
41 } 42 }
42 43
43 } // namespace js 44 } // namespace js
44 } // namespace edk 45 } // namespace edk
45 } // namespace mojo 46 } // namespace mojo
46 47
47 namespace gin { 48 namespace gin {
48 49
49 v8::Handle<v8::Value> Converter<mojo::Handle>::ToV8(v8::Isolate* isolate, 50 v8::Handle<v8::Value> Converter<mojo::Handle>::ToV8(v8::Isolate* isolate,
50 const mojo::Handle& val) { 51 const mojo::Handle& val) {
(...skipping 24 matching lines...) Expand all
75 return Converter<mojo::Handle>::ToV8(isolate, val); 76 return Converter<mojo::Handle>::ToV8(isolate, val);
76 } 77 }
77 78
78 bool Converter<mojo::MessagePipeHandle>::FromV8(v8::Isolate* isolate, 79 bool Converter<mojo::MessagePipeHandle>::FromV8(v8::Isolate* isolate,
79 v8::Handle<v8::Value> val, 80 v8::Handle<v8::Value> val,
80 mojo::MessagePipeHandle* out) { 81 mojo::MessagePipeHandle* out) {
81 return Converter<mojo::Handle>::FromV8(isolate, val, out); 82 return Converter<mojo::Handle>::FromV8(isolate, val, out);
82 } 83 }
83 84
84 } // namespace gin 85 } // namespace gin
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698