| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "bindings/core/v8/V8PagePopupControllerBinding.h" | 5 #include "bindings/core/v8/V8PagePopupControllerBinding.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8Binding.h" | 7 #include "bindings/core/v8/V8Binding.h" |
| 8 #include "bindings/core/v8/V8Window.h" | 8 #include "bindings/core/v8/V8Window.h" |
| 9 #include "core/dom/ContextFeatures.h" | 9 #include "core/dom/ContextFeatures.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 } // namespace | 34 } // namespace |
| 35 | 35 |
| 36 void V8PagePopupControllerBinding::installPagePopupController(v8::Local<v8::Cont
ext> context, v8::Local<v8::Object> windowWrapper) | 36 void V8PagePopupControllerBinding::installPagePopupController(v8::Local<v8::Cont
ext> context, v8::Local<v8::Object> windowWrapper) |
| 37 { | 37 { |
| 38 ExecutionContext* executionContext = toExecutionContext(windowWrapper->Creat
ionContext()); | 38 ExecutionContext* executionContext = toExecutionContext(windowWrapper->Creat
ionContext()); |
| 39 if (!(executionContext && executionContext->isDocument() | 39 if (!(executionContext && executionContext->isDocument() |
| 40 && ContextFeatures::pagePopupEnabled(toDocument(executionContext)))) | 40 && ContextFeatures::pagePopupEnabled(toDocument(executionContext)))) |
| 41 return; | 41 return; |
| 42 | 42 |
| 43 windowWrapper->SetAccessor( | 43 if (windowWrapper->SetAccessor( |
| 44 context, | 44 context, |
| 45 v8AtomicString(context->GetIsolate(), "pagePopupController"), | 45 v8AtomicString(context->GetIsolate(), "pagePopupController"), |
| 46 pagePopupControllerAttributeGetterCallback); | 46 pagePopupControllerAttributeGetterCallback).IsNothing()) { |
| 47 // TODO: What action should, if any, should be taken here? |
| 48 } |
| 47 } | 49 } |
| 48 | 50 |
| 49 } // namespace blink | 51 } // namespace blink |
| OLD | NEW |