OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/renderer/extensions/notifications_native_handler.h" | 5 #include "chrome/renderer/extensions/notifications_native_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactors().back()); | 31 ui::GetScaleForScaleFactor(ui::GetSupportedScaleFactors().back()); |
32 | 32 |
33 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); | 33 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); |
34 dict->SetDouble("scaleFactor", scale_factor); | 34 dict->SetDouble("scaleFactor", scale_factor); |
35 dict->SetInteger("icon.width", bitmap_sizes.icon_size.width()); | 35 dict->SetInteger("icon.width", bitmap_sizes.icon_size.width()); |
36 dict->SetInteger("icon.height", bitmap_sizes.icon_size.height()); | 36 dict->SetInteger("icon.height", bitmap_sizes.icon_size.height()); |
37 dict->SetInteger("image.width", bitmap_sizes.image_size.width()); | 37 dict->SetInteger("image.width", bitmap_sizes.image_size.width()); |
38 dict->SetInteger("image.height", bitmap_sizes.image_size.height()); | 38 dict->SetInteger("image.height", bitmap_sizes.image_size.height()); |
39 dict->SetInteger("buttonIcon.width", bitmap_sizes.button_icon_size.width()); | 39 dict->SetInteger("buttonIcon.width", bitmap_sizes.button_icon_size.width()); |
40 dict->SetInteger("buttonIcon.height", bitmap_sizes.button_icon_size.height()); | 40 dict->SetInteger("buttonIcon.height", bitmap_sizes.button_icon_size.height()); |
| 41 dict->SetInteger("smallIcon.width", bitmap_sizes.small_icon_size.width()); |
| 42 dict->SetInteger("smallIcon.height", bitmap_sizes.small_icon_size.height()); |
41 | 43 |
42 scoped_ptr<content::V8ValueConverter> converter( | 44 scoped_ptr<content::V8ValueConverter> converter( |
43 content::V8ValueConverter::create()); | 45 content::V8ValueConverter::create()); |
44 args.GetReturnValue().Set( | 46 args.GetReturnValue().Set( |
45 converter->ToV8Value(dict.get(), context()->v8_context())); | 47 converter->ToV8Value(dict.get(), context()->v8_context())); |
46 } | 48 } |
47 | 49 |
48 } // namespace extensions | 50 } // namespace extensions |
OLD | NEW |