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

Side by Side Diff: components/guest_view/browser/guest_view_base.h

Issue 1102173002: Move GuestView layer in browser to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed unnecessary dependency Created 5 years, 7 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
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 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 5 #ifndef COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_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/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "components/guest_view/common/guest_view_constants.h"
12 #include "components/ui/zoom/zoom_observer.h" 13 #include "components/ui/zoom/zoom_observer.h"
13 #include "content/public/browser/browser_plugin_guest_delegate.h" 14 #include "content/public/browser/browser_plugin_guest_delegate.h"
14 #include "content/public/browser/guest_host.h" 15 #include "content/public/browser/guest_host.h"
15 #include "content/public/browser/render_process_host_observer.h" 16 #include "content/public/browser/render_process_host_observer.h"
16 #include "content/public/browser/web_contents.h" 17 #include "content/public/browser/web_contents.h"
17 #include "content/public/browser/web_contents_delegate.h" 18 #include "content/public/browser/web_contents_delegate.h"
18 #include "content/public/browser/web_contents_observer.h" 19 #include "content/public/browser/web_contents_observer.h"
19 #include "extensions/common/guest_view/guest_view_constants.h"
20 20
21 struct RendererContentSettingRules; 21 struct RendererContentSettingRules;
22 22
23 namespace extensions { 23 namespace guest_view {
24 24
25 class GuestViewEvent; 25 class GuestViewEvent;
26 26
27 // A struct of parameters for SetSize(). The parameters are all declared as 27 // A struct of parameters for SetSize(). The parameters are all declared as
28 // scoped pointers since they are all optional. Null pointers indicate that the 28 // scoped pointers since they are all optional. Null pointers indicate that the
29 // parameter has not been provided, and the last used value should be used. Note 29 // parameter has not been provided, and the last used value should be used. Note
30 // that when |enable_auto_size| is true, providing |normal_size| is not 30 // that when |enable_auto_size| is true, providing |normal_size| is not
31 // meaningful. This is because the normal size of the guestview is overridden 31 // meaningful. This is because the normal size of the guestview is overridden
32 // whenever autosizing occurs. 32 // whenever autosizing occurs.
33 struct SetSizeParams { 33 struct SetSizeParams {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 content::GuestHost* host() const { 222 content::GuestHost* host() const {
223 return guest_host_; 223 return guest_host_;
224 } 224 }
225 225
226 // Returns the parameters associated with the element hosting this GuestView 226 // Returns the parameters associated with the element hosting this GuestView
227 // passed in from JavaScript. 227 // passed in from JavaScript.
228 base::DictionaryValue* attach_params() const { return attach_params_.get(); } 228 base::DictionaryValue* attach_params() const { return attach_params_.get(); }
229 229
230 // Returns whether this guest has an associated embedder. 230 // Returns whether this guest has an associated embedder.
231 bool attached() const { 231 bool attached() const {
232 return element_instance_id_ != guestview::kInstanceIDNone; 232 return element_instance_id_ != kInstanceIDNone;
233 } 233 }
234 234
235 // Returns the instance ID of the <*view> element. 235 // Returns the instance ID of the <*view> element.
236 int view_instance_id() const { return view_instance_id_; } 236 int view_instance_id() const { return view_instance_id_; }
237 237
238 // Returns the instance ID of this GuestViewBase. 238 // Returns the instance ID of this GuestViewBase.
239 int guest_instance_id() const { return guest_instance_id_; } 239 int guest_instance_id() const { return guest_instance_id_; }
240 240
241 // Returns the instance ID of the GuestViewBase's element. 241 // Returns the instance ID of the GuestViewBase's element.
242 int element_instance_id() const { return element_instance_id_; } 242 int element_instance_id() const { return element_instance_id_; }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // The routing ID of the proxy to the guest in the owner's renderer process. 446 // The routing ID of the proxy to the guest in the owner's renderer process.
447 int guest_proxy_routing_id_; 447 int guest_proxy_routing_id_;
448 448
449 // This is used to ensure pending tasks will not fire after this object is 449 // This is used to ensure pending tasks will not fire after this object is
450 // destroyed. 450 // destroyed.
451 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 451 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
452 452
453 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 453 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
454 }; 454 };
455 455
456 } // namespace extensions 456 } // namespace guest_view
457 457
458 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 458 #endif // COMPONENTS_GUEST_VIEW_BROWSER_GUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698