| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "modules/installedapp/NavigatorInstalledApp.h" | 5 #include "modules/installedapp/NavigatorInstalledApp.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" | 7 #include "bindings/core/v8/CallbackPromiseAdapter.h" |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptPromiseResolver.h" | 9 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 10 #include "bindings/core/v8/ScriptState.h" | 10 #include "bindings/core/v8/ScriptState.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 appController->getInstalledApps( | 82 appController->getInstalledApps( |
| 83 WebSecurityOrigin( | 83 WebSecurityOrigin( |
| 84 scriptState->getExecutionContext()->getSecurityOrigin()), | 84 scriptState->getExecutionContext()->getSecurityOrigin()), |
| 85 WTF::wrapUnique( | 85 WTF::wrapUnique( |
| 86 new CallbackPromiseAdapter<RelatedAppArray, void>(resolver))); | 86 new CallbackPromiseAdapter<RelatedAppArray, void>(resolver))); |
| 87 return promise; | 87 return promise; |
| 88 } | 88 } |
| 89 | 89 |
| 90 InstalledAppController* NavigatorInstalledApp::controller() { | 90 InstalledAppController* NavigatorInstalledApp::controller() { |
| 91 if (!host()->frame()) | 91 if (!supplementable()->frame()) |
| 92 return nullptr; | 92 return nullptr; |
| 93 | 93 |
| 94 return InstalledAppController::from(*host()->frame()); | 94 return InstalledAppController::from(*supplementable()->frame()); |
| 95 } | 95 } |
| 96 | 96 |
| 97 const char* NavigatorInstalledApp::supplementName() { | 97 const char* NavigatorInstalledApp::supplementName() { |
| 98 return "NavigatorInstalledApp"; | 98 return "NavigatorInstalledApp"; |
| 99 } | 99 } |
| 100 | 100 |
| 101 DEFINE_TRACE(NavigatorInstalledApp) { | 101 DEFINE_TRACE(NavigatorInstalledApp) { |
| 102 Supplement<Navigator>::trace(visitor); | 102 Supplement<Navigator>::trace(visitor); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |