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 COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 6 #define COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
12 #include "base/values.h" | 13 #include "base/values.h" |
13 #include "components/guest_view/common/guest_view_constants.h" | 14 #include "components/guest_view/common/guest_view_constants.h" |
14 #include "components/ui/zoom/zoom_observer.h" | 15 #include "components/ui/zoom/zoom_observer.h" |
15 #include "content/public/browser/browser_plugin_guest_delegate.h" | 16 #include "content/public/browser/browser_plugin_guest_delegate.h" |
16 #include "content/public/browser/guest_host.h" | 17 #include "content/public/browser/guest_host.h" |
17 #include "content/public/browser/render_process_host_observer.h" | 18 #include "content/public/browser/render_process_host_observer.h" |
18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
19 #include "content/public/browser/web_contents_delegate.h" | 20 #include "content/public/browser/web_contents_delegate.h" |
20 #include "content/public/browser/web_contents_observer.h" | 21 #include "content/public/browser/web_contents_observer.h" |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 425 |
425 // |initialized_| indicates whether GuestViewBase::Init has been called for | 426 // |initialized_| indicates whether GuestViewBase::Init has been called for |
426 // this object. | 427 // this object. |
427 bool initialized_; | 428 bool initialized_; |
428 | 429 |
429 // Indicates that this guest is in the process of being destroyed. | 430 // Indicates that this guest is in the process of being destroyed. |
430 bool is_being_destroyed_; | 431 bool is_being_destroyed_; |
431 | 432 |
432 // This is a queue of Events that are destined to be sent to the embedder once | 433 // This is a queue of Events that are destined to be sent to the embedder once |
433 // the guest is attached to a particular embedder. | 434 // the guest is attached to a particular embedder. |
434 std::deque<linked_ptr<GuestViewEvent> > pending_events_; | 435 std::deque<scoped_ptr<GuestViewEvent>> pending_events_; |
435 | 436 |
436 // The opener guest view. | 437 // The opener guest view. |
437 base::WeakPtr<GuestViewBase> opener_; | 438 base::WeakPtr<GuestViewBase> opener_; |
438 | 439 |
439 // The parameters associated with the element hosting this GuestView that | 440 // The parameters associated with the element hosting this GuestView that |
440 // are passed in from JavaScript. This will typically be the view instance ID, | 441 // are passed in from JavaScript. This will typically be the view instance ID, |
441 // and element-specific parameters. These parameters are passed along to new | 442 // and element-specific parameters. These parameters are passed along to new |
442 // guests that are created from this guest. | 443 // guests that are created from this guest. |
443 scoped_ptr<base::DictionaryValue> attach_params_; | 444 scoped_ptr<base::DictionaryValue> attach_params_; |
444 | 445 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // This is used to ensure pending tasks will not fire after this object is | 479 // This is used to ensure pending tasks will not fire after this object is |
479 // destroyed. | 480 // destroyed. |
480 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 481 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
481 | 482 |
482 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 483 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
483 }; | 484 }; |
484 | 485 |
485 } // namespace guest_view | 486 } // namespace guest_view |
486 | 487 |
487 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ | 488 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_ |
OLD | NEW |