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

Side by Side Diff: chrome/renderer/extensions/app_bindings.h

Issue 2859233003: [Extensions] Improve app custom bindings (Closed)
Patch Set: jbroman's Created 3 years, 7 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 | « no previous file | chrome/renderer/extensions/app_bindings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // The AppObjectExtension is a v8 extension that creates an object 5 // The AppObjectExtension is a v8 extension that creates an object
6 // at window.chrome.app. This object allows javascript to get details 6 // at window.chrome.app. This object allows javascript to get details
7 // on the app state of the page. 7 // on the app state of the page.
8 // The read-only property app.isInstalled is true if the current page is 8 // The read-only property app.isInstalled is true if the current page is
9 // within the extent of an installed, enabled app. 9 // within the extent of an installed, enabled app.
10 10
11 #ifndef CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_ 11 #ifndef CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_
12 #define CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_ 12 #define CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_
13 13
14 #include "base/compiler_specific.h"
15 #include "base/macros.h" 14 #include "base/macros.h"
16 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h" 15 #include "chrome/renderer/extensions/chrome_v8_extension_handler.h"
17 #include "extensions/renderer/object_backed_native_handler.h" 16 #include "extensions/renderer/object_backed_native_handler.h"
18 #include "third_party/WebKit/public/web/WebFrame.h" 17
18 namespace blink {
19 class WebLocalFrame;
20 }
19 21
20 namespace extensions { 22 namespace extensions {
21 class Dispatcher; 23 class Dispatcher;
22 24
23 // Implements the chrome.app JavaScript object. 25 // Implements the chrome.app JavaScript object.
24 // 26 //
25 // TODO(aa): Add unit testing for this class. 27 // TODO(aa): Add unit testing for this class.
26 class AppBindings : public ObjectBackedNativeHandler, 28 class AppBindings : public ObjectBackedNativeHandler,
27 public ChromeV8ExtensionHandler { 29 public ChromeV8ExtensionHandler {
28 public: 30 public:
(...skipping 15 matching lines...) Expand all
44 46
45 // Dispatcher handle. Not owned. 47 // Dispatcher handle. Not owned.
46 Dispatcher* dispatcher_; 48 Dispatcher* dispatcher_;
47 49
48 DISALLOW_COPY_AND_ASSIGN(AppBindings); 50 DISALLOW_COPY_AND_ASSIGN(AppBindings);
49 }; 51 };
50 52
51 } // namespace extensions 53 } // namespace extensions
52 54
53 #endif // CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_ 55 #endif // CHROME_RENDERER_EXTENSIONS_APP_BINDINGS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/app_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698