OLD | NEW |
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 #include "webkit/tools/test_shell/simple_appcache_system.h" | 5 #include "webkit/tools/test_shell/simple_appcache_system.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/lock.h" | 8 #include "base/lock.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "base/waitable_event.h" | 10 #include "base/waitable_event.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 return; | 92 return; |
93 if (system_->is_io_thread()) | 93 if (system_->is_io_thread()) |
94 system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( | 94 system_->ui_message_loop()->PostTask(FROM_HERE, NewRunnableMethod( |
95 this, &SimpleFrontendProxy::OnEventRaised, host_ids, event_id)); | 95 this, &SimpleFrontendProxy::OnEventRaised, host_ids, event_id)); |
96 else if (system_->is_ui_thread()) | 96 else if (system_->is_ui_thread()) |
97 system_->frontend_impl_.OnEventRaised(host_ids, event_id); | 97 system_->frontend_impl_.OnEventRaised(host_ids, event_id); |
98 else | 98 else |
99 NOTREACHED(); | 99 NOTREACHED(); |
100 } | 100 } |
101 | 101 |
| 102 virtual void OnContentBlocked(int host_id) {} |
| 103 |
102 private: | 104 private: |
103 friend class base::RefCountedThreadSafe<SimpleFrontendProxy>; | 105 friend class base::RefCountedThreadSafe<SimpleFrontendProxy>; |
104 | 106 |
105 ~SimpleFrontendProxy() {} | 107 ~SimpleFrontendProxy() {} |
106 | 108 |
107 SimpleAppCacheSystem* system_; | 109 SimpleAppCacheSystem* system_; |
108 }; | 110 }; |
109 | 111 |
110 | 112 |
111 // SimpleBackendProxy -------------------------------------------------------- | 113 // SimpleBackendProxy -------------------------------------------------------- |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 371 |
370 delete backend_impl_; | 372 delete backend_impl_; |
371 delete service_; | 373 delete service_; |
372 backend_impl_ = NULL; | 374 backend_impl_ = NULL; |
373 service_ = NULL; | 375 service_ = NULL; |
374 io_message_loop_ = NULL; | 376 io_message_loop_ = NULL; |
375 | 377 |
376 // Just in case the main thread is waiting on it. | 378 // Just in case the main thread is waiting on it. |
377 backend_proxy_->SignalEvent(); | 379 backend_proxy_->SignalEvent(); |
378 } | 380 } |
OLD | NEW |