| Index: chrome/renderer/extensions/chrome_v8_context.cc
|
| diff --git a/chrome/renderer/extensions/chrome_v8_context.cc b/chrome/renderer/extensions/chrome_v8_context.cc
|
| index 98b0c077573cf934e0882ad1b7638516bdab2707..3e214f519718cf8d61b58bae04bb317c06bdeadd 100644
|
| --- a/chrome/renderer/extensions/chrome_v8_context.cc
|
| +++ b/chrome/renderer/extensions/chrome_v8_context.cc
|
| @@ -22,18 +22,30 @@ const char kChromeHidden[] = "chromeHidden";
|
| const char kValidateCallbacks[] = "validateCallbacks";
|
| #endif
|
|
|
| -} // namespace
|
| +std::string GetContextTypeDescription(
|
| + ChromeV8Context::ContextType context_type) {
|
| + switch (context_type) {
|
| + case ChromeV8Context::OTHER: return "other";
|
| + case ChromeV8Context::CONTENT_SCRIPT: return "content script";
|
| + }
|
| + NOTREACHED();
|
| + return "";
|
| +}
|
|
|
| +} // namespace
|
|
|
| ChromeV8Context::ChromeV8Context(v8::Handle<v8::Context> v8_context,
|
| WebKit::WebFrame* web_frame,
|
| - const std::string& extension_id)
|
| + const std::string& extension_id,
|
| + ChromeV8Context::ContextType context_type)
|
| : v8_context_(v8::Persistent<v8::Context>::New(v8_context)),
|
| web_frame_(web_frame),
|
| - extension_id_(extension_id) {
|
| + extension_id_(extension_id),
|
| + context_type_(context_type) {
|
| VLOG(1) << "Created context for extension\n"
|
| - << " id: " << extension_id << "\n"
|
| - << " frame: " << web_frame_;
|
| + << " id: " << extension_id << "\n"
|
| + << " frame: " << web_frame_ << "\n"
|
| + << " context type: " << GetContextTypeDescription(context_type);
|
| }
|
|
|
| ChromeV8Context::~ChromeV8Context() {
|
|
|