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

Side by Side Diff: extensions/browser/guest_view/surface_worker/surface_worker_guest.h

Issue 1102173002: Move GuestView layer in browser to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Mac Build + GN Test builds Created 5 years, 8 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_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_ 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_ 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_
7 7
8 #include "extensions/browser/guest_view/guest_view.h" 8 #include "components/guest_view/browser/guest_view.h"
9 9
10 namespace extensions { 10 namespace extensions {
11 class Extension; 11 class Extension;
12 class ExtensionHost; 12 class ExtensionHost;
13 13
14 // An SurfaceWorkerGuest provides the browser-side implementation of the 14 // An SurfaceWorkerGuest provides the browser-side implementation of the
15 // prototype <wtframe> API. 15 // prototype <wtframe> API.
16 class SurfaceWorkerGuest : public GuestView<SurfaceWorkerGuest> { 16 class SurfaceWorkerGuest : public guestview::GuestView<SurfaceWorkerGuest> {
17 public: 17 public:
18 static const char Type[]; 18 static const char Type[];
19 19
20 static GuestViewBase* Create(content::WebContents* owner_web_contents); 20 static guestview::GuestViewBase* Create(
21 content::WebContents* owner_web_contents);
21 22
22 // content::WebContentsDelegate implementation. 23 // content::WebContentsDelegate implementation.
23 bool HandleContextMenu(const content::ContextMenuParams& params) override; 24 bool HandleContextMenu(const content::ContextMenuParams& params) override;
24 25
25 // GuestViewBase implementation. 26 // GuestViewBase implementation.
26 const char* GetAPINamespace() const override; 27 const char* GetAPINamespace() const override;
27 int GetTaskPrefix() const override; 28 int GetTaskPrefix() const override;
28 void CreateWebContents(const base::DictionaryValue& create_params, 29 void CreateWebContents(const base::DictionaryValue& create_params,
29 const WebContentsCreatedCallback& callback) override; 30 const WebContentsCreatedCallback& callback) override;
30 void DidAttachToEmbedder() override; 31 void DidAttachToEmbedder() override;
31 32
32 private: 33 private:
33 explicit SurfaceWorkerGuest(content::WebContents* owner_web_contents); 34 explicit SurfaceWorkerGuest(content::WebContents* owner_web_contents);
34 35
35 ~SurfaceWorkerGuest() override; 36 ~SurfaceWorkerGuest() override;
36 37
37 GURL url_; 38 GURL url_;
38 39
39 // This is used to ensure pending tasks will not fire after this object is 40 // This is used to ensure pending tasks will not fire after this object is
40 // destroyed. 41 // destroyed.
41 base::WeakPtrFactory<SurfaceWorkerGuest> weak_ptr_factory_; 42 base::WeakPtrFactory<SurfaceWorkerGuest> weak_ptr_factory_;
42 43
43 DISALLOW_COPY_AND_ASSIGN(SurfaceWorkerGuest); 44 DISALLOW_COPY_AND_ASSIGN(SurfaceWorkerGuest);
44 }; 45 };
45 46
46 } // namespace extensions 47 } // namespace extensions
47 48
48 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_ 49 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_SURFACE_WORKER_SURFACE_WORKER_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698