Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: third_party/WebKit/Source/modules/nfc/NFC.cpp

Issue 2138663003: Rename PageLifecycleObserver to PageVisibilityObserver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "modules/nfc/NFC.h" 5 #include "modules/nfc/NFC.h"
6 6
7 #include "bindings/core/v8/JSONValuesForV8.h" 7 #include "bindings/core/v8/JSONValuesForV8.h"
8 #include "bindings/core/v8/ScriptPromiseResolver.h" 8 #include "bindings/core/v8/ScriptPromiseResolver.h"
9 #include "bindings/core/v8/V8ArrayBuffer.h" 9 #include "bindings/core/v8/V8ArrayBuffer.h"
10 #include "core/dom/DOMArrayBuffer.h" 10 #include "core/dom/DOMArrayBuffer.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 originURL.setPath(message->url); 431 originURL.setPath(message->url);
432 } 432 }
433 433
434 message->url = originURL; 434 message->url = originURL;
435 return originURL.isValid(); 435 return originURL.isValid();
436 } 436 }
437 437
438 } // anonymous namespace 438 } // anonymous namespace
439 439
440 NFC::NFC(LocalFrame* frame) 440 NFC::NFC(LocalFrame* frame)
441 : PageLifecycleObserver(frame->page()) 441 : PageVisibilityObserver(frame->page())
442 , ContextLifecycleObserver(frame->document()) 442 , ContextLifecycleObserver(frame->document())
443 , m_client(this) 443 , m_client(this)
444 { 444 {
445 ThreadState::current()->registerPreFinalizer(this); 445 ThreadState::current()->registerPreFinalizer(this);
446 frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_nfc)); 446 frame->serviceRegistry()->connectToRemoteService(mojo::GetProxy(&m_nfc));
447 m_nfc.set_connection_error_handler(convertToBaseCallback(WTF::bind(&NFC::OnC onnectionError, wrapWeakPersistent(this)))); 447 m_nfc.set_connection_error_handler(convertToBaseCallback(WTF::bind(&NFC::OnC onnectionError, wrapWeakPersistent(this))));
448 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind()); 448 m_nfc->SetClient(m_client.CreateInterfacePtrAndBind());
449 } 449 }
450 450
451 NFC* NFC::create(LocalFrame* frame) 451 NFC* NFC::create(LocalFrame* frame)
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 m_requests.clear(); 574 m_requests.clear();
575 } 575 }
576 576
577 void NFC::OnWatch(mojo::WTFArray<uint32_t> ids, nfc::NFCMessagePtr) 577 void NFC::OnWatch(mojo::WTFArray<uint32_t> ids, nfc::NFCMessagePtr)
578 { 578 {
579 // TODO(shalamov): Not implemented. 579 // TODO(shalamov): Not implemented.
580 } 580 }
581 581
582 DEFINE_TRACE(NFC) 582 DEFINE_TRACE(NFC)
583 { 583 {
584 PageLifecycleObserver::trace(visitor); 584 PageVisibilityObserver::trace(visitor);
585 ContextLifecycleObserver::trace(visitor); 585 ContextLifecycleObserver::trace(visitor);
586 visitor->trace(m_requests); 586 visitor->trace(m_requests);
587 } 587 }
588 588
589 } // namespace blink 589 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/nfc/NFC.h ('k') | third_party/WebKit/Source/modules/presentation/PresentationAvailability.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698