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

Side by Side Diff: extensions/browser/guest_view/worker_frame/worker_frame_guest.h

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

Powered by Google App Engine
This is Rietveld 408576698