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

Side by Side Diff: Source/modules/presentation/NavigatorPresentation.cpp

Issue 879423003: Move Location to DOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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 "config.h" 5 #include "config.h"
6 #include "modules/presentation/NavigatorPresentation.h" 6 #include "modules/presentation/NavigatorPresentation.h"
7 7
8 #include "core/frame/Navigator.h" 8 #include "core/frame/Navigator.h"
9 #include "modules/presentation/Presentation.h" 9 #include "modules/presentation/Presentation.h"
10 10
(...skipping 24 matching lines...) Expand all
35 return *supplement; 35 return *supplement;
36 } 36 }
37 37
38 // static 38 // static
39 Presentation* NavigatorPresentation::presentation(Navigator& navigator) 39 Presentation* NavigatorPresentation::presentation(Navigator& navigator)
40 { 40 {
41 NavigatorPresentation& self = NavigatorPresentation::from(navigator); 41 NavigatorPresentation& self = NavigatorPresentation::from(navigator);
42 if (!self.m_presentation) { 42 if (!self.m_presentation) {
43 if (!navigator.frame()) 43 if (!navigator.frame())
44 return nullptr; 44 return nullptr;
45 self.m_presentation = Presentation::create(navigator.frame()); 45 self.m_presentation = Presentation::create(navigator.localFrame());
46 } 46 }
47 return self.m_presentation.get(); 47 return self.m_presentation.get();
48 } 48 }
49 49
50 void NavigatorPresentation::trace(Visitor* visitor) 50 void NavigatorPresentation::trace(Visitor* visitor)
51 { 51 {
52 visitor->trace(m_presentation); 52 visitor->trace(m_presentation);
53 WillBeHeapSupplement<Navigator>::trace(visitor); 53 WillBeHeapSupplement<Navigator>::trace(visitor);
54 } 54 }
55 55
56 } // namespace blink 56 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698