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

Side by Side Diff: third_party/WebKit/Source/modules/presentation/Presentation.cpp

Issue 2862963003: Replace ASSERT with DCHECK in modules/ (Closed)
Patch Set: NOTREACHED instead of DCHECK(false) Created 3 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/presentation/Presentation.h" 5 #include "modules/presentation/Presentation.h"
6 6
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "modules/presentation/PresentationController.h" 10 #include "modules/presentation/PresentationController.h"
11 #include "modules/presentation/PresentationReceiver.h" 11 #include "modules/presentation/PresentationReceiver.h"
12 #include "modules/presentation/PresentationRequest.h" 12 #include "modules/presentation/PresentationRequest.h"
13 #include "platform/weborigin/KURL.h" 13 #include "platform/weborigin/KURL.h"
14 #include "platform/wtf/Vector.h" 14 #include "platform/wtf/Vector.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 Presentation::Presentation(LocalFrame* frame) : ContextClient(frame) {} 18 Presentation::Presentation(LocalFrame* frame) : ContextClient(frame) {}
19 19
20 // static 20 // static
21 Presentation* Presentation::Create(LocalFrame* frame) { 21 Presentation* Presentation::Create(LocalFrame* frame) {
22 ASSERT(frame); 22 DCHECK(frame);
23 Presentation* presentation = new Presentation(frame); 23 Presentation* presentation = new Presentation(frame);
24 PresentationController* controller = PresentationController::From(*frame); 24 PresentationController* controller = PresentationController::From(*frame);
25 ASSERT(controller); 25 DCHECK(controller);
26 controller->SetPresentation(presentation); 26 controller->SetPresentation(presentation);
27 return presentation; 27 return presentation;
28 } 28 }
29 29
30 DEFINE_TRACE(Presentation) { 30 DEFINE_TRACE(Presentation) {
31 visitor->Trace(default_request_); 31 visitor->Trace(default_request_);
32 visitor->Trace(receiver_); 32 visitor->Trace(receiver_);
33 ContextClient::Trace(visitor); 33 ContextClient::Trace(visitor);
34 } 34 }
35 35
(...skipping 26 matching lines...) Expand all
62 PresentationController* controller = 62 PresentationController* controller =
63 PresentationController::From(*GetFrame()); 63 PresentationController::From(*GetFrame());
64 auto* client = controller ? controller->Client() : nullptr; 64 auto* client = controller ? controller->Client() : nullptr;
65 receiver_ = new PresentationReceiver(GetFrame(), client); 65 receiver_ = new PresentationReceiver(GetFrame(), client);
66 } 66 }
67 67
68 return receiver_; 68 return receiver_;
69 } 69 }
70 70
71 } // namespace blink 71 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698