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

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: Move test files out of shim/ directory 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
27 // Request navigating the guest to the provided |src| URL.
28 void NavigateGuest(const std::string& src, bool force_navigation);
29
30 // GuestViewBase implementation.
31 void CreateWebContents(const base::DictionaryValue& create_params,
32 const WebContentsCreatedCallback& callback) override;
33 void DidAttachToEmbedder() override;
34 const char* GetAPINamespace() const override;
35 int GetTaskPrefix() const override;
36
37 // content::WebContentsObserver implementation.
38 bool OnMessageReceived(const IPC::Message& message) override;
39
40 private:
41 ExtensionViewGuest(content::WebContents* owner_web_contents);
42 ~ExtensionViewGuest() override;
43 void OnRequest(const ExtensionHostMsg_Request_Params& params);
44
45 // Applies attributes to the extensionview.
46 void ApplyAttributes(const base::DictionaryValue& params);
47
48 scoped_ptr<extensions::ExtensionFunctionDispatcher>
49 extension_function_dispatcher_;
50 GURL view_page_;
51
52 DISALLOW_COPY_AND_ASSIGN(ExtensionViewGuest);
53 };
54
55 } // namespace extensions
56
57 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_EXTENSION_VIEW_EXTENSION_VIEW_GUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698