Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / renderer / extensions / notifications_native_handler.h
blobf47a8082232141963104601f771cc412af2ba4ad
1 // Copyright 2014 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.
5 #ifndef CHROME_RENDERER_EXTENSIONS_NOTIFICATIONS_NATIVE_HANDLER_H_
6 #define CHROME_RENDERER_EXTENSIONS_NOTIFICATIONS_NATIVE_HANDLER_H_
8 #include "base/compiler_specific.h"
9 #include "extensions/renderer/object_backed_native_handler.h"
11 namespace base {
12 class Value;
15 namespace extensions {
17 class NotificationsNativeHandler : public ObjectBackedNativeHandler {
18 public:
19 explicit NotificationsNativeHandler(ScriptContext* context);
21 private:
22 // This implements notifications_private.GetImageSizes() which
23 // informs the renderer of the actual rendered size of each
24 // component of a notification. It additionally includes
25 // information about the system's maximum scale factor so that
26 // larger images specified in DP can be interpreted as scaled
27 // versions of the DIP size.
28 // * |args| is used only to get the return value.
29 // * The return value contains the following keys:
30 // scaleFactor - a float a la devicePixelRatio
31 // icon - a dictionary with integer keys "height" and "width" (DIPs)
32 // image - a dictionary of the same format as |icon|
33 // buttonIcon - a dictionary of the same format as |icon|
34 void GetNotificationImageSizes(
35 const v8::FunctionCallbackInfo<v8::Value>& args);
37 DISALLOW_COPY_AND_ASSIGN(NotificationsNativeHandler);
40 } // namespace extensions
42 #endif // CHROME_RENDERER_EXTENSIONS_NOTIFICATIONS_NATIVE_HANDLER_H_