| 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 29 matching lines...) Expand all Loading... |
| 40 v8::Local<v8::Context> context, | 40 v8::Local<v8::Context> context, |
| 41 v8::Local<v8::Object> windowWrapper) { | 41 v8::Local<v8::Object> windowWrapper) { |
| 42 ExecutionContext* executionContext = | 42 ExecutionContext* executionContext = |
| 43 toExecutionContext(windowWrapper->CreationContext()); | 43 toExecutionContext(windowWrapper->CreationContext()); |
| 44 if (!(executionContext && executionContext->isDocument() && | 44 if (!(executionContext && executionContext->isDocument() && |
| 45 ContextFeatures::pagePopupEnabled(toDocument(executionContext)))) | 45 ContextFeatures::pagePopupEnabled(toDocument(executionContext)))) |
| 46 return; | 46 return; |
| 47 | 47 |
| 48 windowWrapper->SetAccessor( | 48 windowWrapper->SetAccessor( |
| 49 context, v8AtomicString(context->GetIsolate(), "pagePopupController"), | 49 context, v8AtomicString(context->GetIsolate(), "pagePopupController"), |
| 50 pagePopupControllerAttributeGetterCallback); | 50 pagePopupControllerAttributeGetterCallback).ToChecked(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace blink | 53 } // namespace blink |
| OLD | NEW |