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/api/extension_view/extension_view_internal_api.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_API_EXTENSION_VIEW_EXTENSION_VIEW_INTERNAL_API_H_
6 #define EXTENSIONS_BROWSER_API_EXTENSION_VIEW_EXTENSION_VIEW_INTERNAL_API_H_
7
8 #include "extensions/browser/api/capture_web_contents_function.h"
9 #include "extensions/browser/api/execute_code_function.h"
10 #include "extensions/browser/extension_function.h"
11 #include "extensions/browser/guest_view/extension_view/extension_view_guest.h"
12
13 namespace extensions {
14
15 // An abstract base class for async extensionview APIs. It does a process ID
16 // check in RunAsync, and then calls RunAsyncSafe which must be overriden by
17 // all subclasses.
18 class ExtensionViewInternalExtensionFunction : public AsyncExtensionFunction {
19 public:
20 ExtensionViewInternalExtensionFunction() {}
21
22 protected:
23 ~ExtensionViewInternalExtensionFunction() override {}
24
25 // ExtensionFunction implementation.
26 bool RunAsync() final;
27
28 private:
29 virtual bool RunAsyncSafe(ExtensionViewGuest* guest) = 0;
30 };
31
32 class ExtensionViewInternalNavigateFunction
33 : public ExtensionViewInternalExtensionFunction {
34 public:
35 DECLARE_EXTENSION_FUNCTION("extensionViewInternal.navigate",
36 EXTENSIONVIEWINTERNAL_NAVIGATE);
37 ExtensionViewInternalNavigateFunction() {}
38
39 protected:
40 ~ExtensionViewInternalNavigateFunction() override {}
41
42 private:
43 // ExtensionViewInternalExtensionFunction implementation.
44 bool RunAsyncSafe(ExtensionViewGuest* guest) override;
45
46 DISALLOW_COPY_AND_ASSIGN(ExtensionViewInternalNavigateFunction);
47 };
48
49 } // namespace extensions
50
51 #endif // CHROME_BROWSER_EXTENSIONS_API_EXTENSION_VIEW_EXTENSION_VIEW_INTERNAL_ API_H_
52
OLDNEW
« no previous file with comments | « extensions/browser/BUILD.gn ('k') | extensions/browser/api/extension_view/extension_view_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698