OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/html/imports/HTMLImportsController.h" | 32 #include "core/html/imports/HTMLImportsController.h" |
33 | 33 |
34 #include "core/dom/Document.h" | 34 #include "core/dom/Document.h" |
35 #include "core/fetch/ResourceFetcher.h" | 35 #include "core/fetch/ResourceFetcher.h" |
36 #include "core/html/imports/HTMLImportChild.h" | 36 #include "core/html/imports/HTMLImportChild.h" |
37 #include "core/html/imports/HTMLImportChildClient.h" | 37 #include "core/html/imports/HTMLImportChildClient.h" |
38 | 38 |
39 namespace WebCore { | 39 namespace WebCore { |
40 | 40 |
41 void HTMLImportsController::provideTo(Document* master) | 41 void HTMLImportsController::provideTo(Document& master) |
42 { | 42 { |
43 DEFINE_STATIC_LOCAL(const char*, name, ("HTMLImportsController")); | 43 DEFINE_STATIC_LOCAL(const char*, name, ("HTMLImportsController")); |
44 OwnPtr<HTMLImportsController> controller = adoptPtr(new HTMLImportsControlle
r(master)); | 44 OwnPtr<HTMLImportsController> controller = adoptPtr(new HTMLImportsControlle
r(master)); |
45 master->setImport(controller.get()); | 45 master.setImport(controller.get()); |
46 DocumentSupplement::provideTo(master, name, controller.release()); | 46 DocumentSupplement::provideTo(master, name, controller.release()); |
47 } | 47 } |
48 | 48 |
49 HTMLImportsController::HTMLImportsController(Document* master) | 49 HTMLImportsController::HTMLImportsController(Document& master) |
50 : m_master(master) | 50 : m_master(&master) |
51 , m_recalcTimer(this, &HTMLImportsController::recalcTimerFired) | 51 , m_recalcTimer(this, &HTMLImportsController::recalcTimerFired) |
52 { | 52 { |
53 recalcTreeState(this); // This recomputes initial state. | 53 recalcTreeState(this); // This recomputes initial state. |
54 } | 54 } |
55 | 55 |
56 HTMLImportsController::~HTMLImportsController() | 56 HTMLImportsController::~HTMLImportsController() |
57 { | 57 { |
58 ASSERT(!m_master); | 58 ASSERT(!m_master); |
59 } | 59 } |
60 | 60 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) | 160 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) |
161 { | 161 { |
162 do { | 162 do { |
163 m_recalcTimer.stop(); | 163 m_recalcTimer.stop(); |
164 HTMLImport::recalcTreeState(this); | 164 HTMLImport::recalcTreeState(this); |
165 } while (m_recalcTimer.isActive()); | 165 } while (m_recalcTimer.isActive()); |
166 } | 166 } |
167 | 167 |
168 } // namespace WebCore | 168 } // namespace WebCore |
OLD | NEW |