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

Side by Side Diff: Source/core/html/imports/HTMLImportsController.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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 /* 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698