OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
7 | 7 |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h" |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Get the guest's DOMWindow proxy. | 93 // Get the guest's DOMWindow proxy. |
94 NPObject* GetContentWindow() const; | 94 NPObject* GetContentWindow() const; |
95 | 95 |
96 // Returns Chrome's process ID for the current guest. | 96 // Returns Chrome's process ID for the current guest. |
97 int guest_process_id() const { return guest_process_id_; } | 97 int guest_process_id() const { return guest_process_id_; } |
98 // Returns Chrome's route ID for the current guest. | 98 // Returns Chrome's route ID for the current guest. |
99 int guest_route_id() const { return guest_route_id_; } | 99 int guest_route_id() const { return guest_route_id_; } |
100 // Returns whether the guest process has crashed. | 100 // Returns whether the guest process has crashed. |
101 bool guest_crashed() const { return guest_crashed_; } | 101 bool guest_crashed() const { return guest_crashed_; } |
102 bool HasGuest() const; | 102 // Returns whether this BrowserPlugin has requested an instance ID. |
| 103 bool HasNavigated() const; |
| 104 // Returns whether this BrowserPlugin has allocated an instance ID. |
| 105 bool HasInstanceID() const; |
103 | 106 |
104 // Attaches the window identified by |window_id| to the the given node | 107 // Attaches the window identified by |window_id| to the the given node |
105 // encapsulating a BrowserPlugin. | 108 // encapsulating a BrowserPlugin. |
106 static bool AttachWindowTo(const WebKit::WebNode& node, | 109 static bool AttachWindowTo(const WebKit::WebNode& node, |
107 int window_id); | 110 int window_id); |
108 | 111 |
109 // Query whether the guest can navigate back to the previous entry. | 112 // Query whether the guest can navigate back to the previous entry. |
110 bool CanGoBack() const; | 113 bool CanGoBack() const; |
111 // Query whether the guest can navigation forward to the next entry. | 114 // Query whether the guest can navigation forward to the next entry. |
112 bool CanGoForward() const; | 115 bool CanGoForward() const; |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might | 451 // Weak factory used in v8 |MakeWeak| callback, since the v8 callback might |
449 // get called after BrowserPlugin has been destroyed. | 452 // get called after BrowserPlugin has been destroyed. |
450 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; | 453 base::WeakPtrFactory<BrowserPlugin> weak_ptr_factory_; |
451 | 454 |
452 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); | 455 DISALLOW_COPY_AND_ASSIGN(BrowserPlugin); |
453 }; | 456 }; |
454 | 457 |
455 } // namespace content | 458 } // namespace content |
456 | 459 |
457 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ | 460 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_H_ |
OLD | NEW |