OLD | NEW |
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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 bool changed; | 362 bool changed; |
363 NewWindowInfo(const GURL& url, const std::string& name) : | 363 NewWindowInfo(const GURL& url, const std::string& name) : |
364 url(url), | 364 url(url), |
365 name(name), | 365 name(name), |
366 changed(false) {} | 366 changed(false) {} |
367 }; | 367 }; |
368 | 368 |
369 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; | 369 typedef std::map<WebViewGuest*, NewWindowInfo> PendingWindowMap; |
370 PendingWindowMap pending_new_windows_; | 370 PendingWindowMap pending_new_windows_; |
371 | 371 |
| 372 // This is used to ensure pending tasks will not fire after this object is |
| 373 // destroyed. |
| 374 base::WeakPtrFactory<WebViewGuest> weak_ptr_factory_; |
| 375 |
372 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); | 376 DISALLOW_COPY_AND_ASSIGN(WebViewGuest); |
373 }; | 377 }; |
374 | 378 |
375 } // namespace extensions | 379 } // namespace extensions |
376 | 380 |
377 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ | 381 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_GUEST_H_ |
OLD | NEW |