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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 63803002: Remove RenderWidgetHost::AddCreatedCallback as part of removing that pattern. The tests which use t… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_impl.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_impl.cc (revision 233297)
+++ content/browser/renderer_host/render_widget_host_impl.cc (working copy)
@@ -91,9 +91,6 @@
// This timeout impacts the "choppiness" of our window resize perf.
const int kPaintMsgTimeoutMS = 50;
-base::LazyInstance<std::vector<RenderWidgetHost::CreatedCallback> >
-g_created_callbacks = LAZY_INSTANCE_INITIALIZER;
-
typedef std::pair<int32, int32> RenderWidgetHostID;
typedef base::hash_map<RenderWidgetHostID, RenderWidgetHostImpl*>
RoutingIDWidgetMap;
@@ -225,9 +222,6 @@
accessibility_mode_ =
BrowserAccessibilityStateImpl::GetInstance()->accessibility_mode();
- for (size_t i = 0; i < g_created_callbacks.Get().size(); i++)
- g_created_callbacks.Get().at(i).Run(this);
-
input_router_.reset(
new ImmediateInputRouter(process_, this, this, routing_id_));
@@ -315,21 +309,6 @@
return rwh->AsRenderWidgetHostImpl();
}
-// static
-void RenderWidgetHost::AddCreatedCallback(const CreatedCallback& callback) {
- g_created_callbacks.Get().push_back(callback);
-}
-
-// static
-void RenderWidgetHost::RemoveCreatedCallback(const CreatedCallback& callback) {
- for (size_t i = 0; i < g_created_callbacks.Get().size(); ++i) {
- if (g_created_callbacks.Get().at(i).Equals(callback)) {
- g_created_callbacks.Get().erase(g_created_callbacks.Get().begin() + i);
- return;
- }
- }
-}
-
void RenderWidgetHostImpl::SetView(RenderWidgetHostView* view) {
view_ = RenderWidgetHostViewPort::FromRWHV(view);
« no previous file with comments | « chrome/browser/apps/web_view_interactive_browsertest.cc ('k') | content/public/browser/render_widget_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698