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

Side by Side Diff: extensions/browser/guest_view/extension_view/extension_view_guest.h

Issue 873933002: Add <extensionview> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml Created 5 years, 10 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
(Empty)
1 // Copyright 2015 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_EXTENSION_VIEW_EXTENSION_VIEW_GUEST_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_VIEW_EXTENSION_VIEW_GUEST_H_
7
8 #include "base/macros.h"
9 #include "extensions/browser/extension_function_dispatcher.h"
10 #include "extensions/browser/guest_view/guest_view.h"
11 #include "url/gurl.h"
12
13 namespace content {
14 class BrowserContext;
15 }
16
17 namespace extensions {
18
19 class ExtensionViewGuest
20 : public extensions::GuestView<ExtensionViewGuest>,
21 public extensions::ExtensionFunctionDispatcher::Delegate {
22 public:
23 static const char Type[];
24 static extensions::GuestViewBase* Create(
25 content::WebContents* owner_web_contents,
26 int guest_instance_id);
27
28 // Request navigating the guest to the provided |src| URL.
29 void NavigateGuest(const std::string& src, bool force_navigation);
30
31 // GuestViewBase implementation.
32 void CreateWebContents(const base::DictionaryValue& create_params,
33 const WebContentsCreatedCallback& callback) override;
34 void DidAttachToEmbedder() override;
35 const char* GetAPINamespace() const override;
36 int GetTaskPrefix() const override;
37
38 // content::WebContentsObserver implementation.
39 bool OnMessageReceived(const IPC::Message& message) override;
40
41 private:
42 ExtensionViewGuest(content::WebContents* owner_web_contents,
43 int guest_instance_id);
44 ~ExtensionViewGuest() override;
45 void OnRequest(const ExtensionHostMsg_Request_Params& params);
46
47 // Applies attributes to the extensionview.
48 void ApplyAttributes(const base::DictionaryValue& params);
49
50 scoped_ptr<extensions::ExtensionFunctionDispatcher>
51 extension_function_dispatcher_;
52 GURL view_page_;
53
54 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGuest);
55 };
56
57 } // namespace extensions
58
59 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_VIEW_EXTENSION_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698