OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/public/renderer/v8_value_converter.h" |
| 10 #include "v8/include/v8.h" |
| 11 |
| 12 namespace base { |
| 13 class Value; |
| 14 } |
| 15 |
| 16 namespace extensions { |
| 17 |
| 18 // ActivityLogValueConverter is used by activity logging to convert V8 values to |
| 19 // base values. It is similar to V8ValueConverter and makes use of |
| 20 // V8ValueConverter; however, it makes sure that none of the accessors and |
| 21 // interceptors are invoked when converting JS objects. |
| 22 |
| 23 class ActivityLogValueConverter { |
| 24 public: |
| 25 ActivityLogValueConverter(); |
| 26 virtual ~ActivityLogValueConverter(); |
| 27 |
| 28 base::Value* FromV8Value(v8::Handle<v8::Value> value, |
| 29 v8::Handle<v8::Context> context) const; |
| 30 private: |
| 31 scoped_ptr<content::V8ValueConverter> v8_value_converter_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(ActivityLogValueConverter); |
| 34 }; |
| 35 |
| 36 } // namespace extensions |
| 37 |
| 38 #endif // CHROME_RENDERER_EXTENSIONS_ACTIVITY_LOG_VALUE_CONVERTER_H_ |
| 39 |
OLD | NEW |