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

Side by Side Diff: components/framelet/browser/framelet_factory_impl.h

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 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
« no previous file with comments | « components/framelet/browser/DEPS ('k') | components/framelet/browser/framelet_factory_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_FRAMELET_BROWSER_FRAMELET_FACTORY_IMPL_H_
6 #define COMPONENTS_FRAMELET_BROWSER_FRAMELET_FACTORY_IMPL_H_
7
8 #include "base/callback.h"
9 #include "base/memory/weak_ptr.h"
10 #include "components/framelet/common/framelet.mojom.h"
11 #include "components/guest_view/browser/guest_view_manager_delegate.h"
12 #include "mojo/public/cpp/bindings/strong_binding.h"
13
14 namespace content {
15 class RenderFrameHost;
16 class WebContents;
17 }
18
19 namespace guest_view {
20 class GuestViewManager;
21 }
22
23 namespace framelet {
24
25 class FrameletFactoryImpl : public mojom::FrameletFactory {
26 public:
27 using CreateGuestViewManagerDelegate =
28 base::Callback<guest_view::GuestViewManagerDelegate*()>;
29
30 FrameletFactoryImpl(content::WebContents* owner_web_contents,
31 const CreateGuestViewManagerDelegate& create_delegate,
32 mojo::InterfaceRequest<FrameletFactory> factory_request);
33 ~FrameletFactoryImpl() override;
34
35 static void CreateService(
36 content::RenderFrameHost* render_frame_host,
37 const CreateGuestViewManagerDelegate& create_delegate,
38 mojo::InterfaceRequest<FrameletFactory> factory_request);
39
40 private:
41 guest_view::GuestViewManager* GetOrCreateGuestViewManager();
42
43 static void FrameletCreatedCallback(
44 mojo::InterfaceRequest<mojom::Framelet> framelet,
45 content::WebContents* guest_web_contents);
46
47 // FrameletFactory
48 void Create(mojo::InterfaceRequest<mojom::Framelet> request,
49 mojo::Map<mojo::String, mojom::ValuePtr> params) override;
50
51 content::WebContents* const owner_web_contents_;
52 CreateGuestViewManagerDelegate create_delegate_;
53 mojo::StrongBinding<mojom::FrameletFactory> binding_;
54 base::WeakPtrFactory<FrameletFactoryImpl> weak_ptr_factory_;
55
56 DISALLOW_COPY_AND_ASSIGN(FrameletFactoryImpl);
57 };
58
59 } // namespace framelet
60
61 #endif // COMPONENTS_FRAMELET_BROWSER_FRAMELET_FACTORY_IMPL_H_
OLDNEW
« no previous file with comments | « components/framelet/browser/DEPS ('k') | components/framelet/browser/framelet_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698