Index: components/html_viewer/stats_collection_observer.cc |
diff --git a/content/renderer/stats_collection_observer.cc b/components/html_viewer/stats_collection_observer.cc |
similarity index 56% |
copy from content/renderer/stats_collection_observer.cc |
copy to components/html_viewer/stats_collection_observer.cc |
index 4c4b911ec8cbedb9cdf0858ec590b48701c0f73a..2efb5f4ca60b4b8d6d547dc0c8998780f6148699 100644 |
--- a/content/renderer/stats_collection_observer.cc |
+++ b/components/html_viewer/stats_collection_observer.cc |
@@ -2,15 +2,12 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/renderer/stats_collection_observer.h" |
+#include "components/html_viewer/stats_collection_observer.h" |
-#include "base/time/time.h" |
-#include "content/renderer/render_view_impl.h" |
+namespace html_viewer { |
-namespace content { |
- |
-StatsCollectionObserver::StatsCollectionObserver(RenderViewImpl* render_view) |
- : RenderViewObserver(render_view) { |
+StatsCollectionObserver::StatsCollectionObserver(HTMLDocument* html_document) |
+ : HTMLDocument::Observer(html_document) { |
} |
StatsCollectionObserver::~StatsCollectionObserver() { |
@@ -26,8 +23,7 @@ void StatsCollectionObserver::DidStopLoading() { |
stop_time_ = base::Time::Now(); |
// Stop observing so we don't get called again. |
- RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); |
- impl->RemoveObserver(this); |
+ html_document()->RemoveObserver(this); |
} |
-} // namespace content |
+} // namespace html_viewer |