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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 5711001: Add a new GetInstance() method for remaining files with singleton classes under chrome/browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/renderer_host/render_widget_host.h" 5 #include "chrome/browser/renderer_host/render_widget_host.h"
6 6
7 #include "app/keyboard_codes.h" 7 #include "app/keyboard_codes.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (routing_id_ == MSG_ROUTING_NONE) 94 if (routing_id_ == MSG_ROUTING_NONE)
95 routing_id_ = process_->GetNextRoutingID(); 95 routing_id_ = process_->GetNextRoutingID();
96 96
97 process_->Attach(this, routing_id_); 97 process_->Attach(this, routing_id_);
98 // Because the widget initializes as is_hidden_ == false, 98 // Because the widget initializes as is_hidden_ == false,
99 // tell the process host that we're alive. 99 // tell the process host that we're alive.
100 process_->WidgetRestored(); 100 process_->WidgetRestored();
101 101
102 if (CommandLine::ForCurrentProcess()->HasSwitch( 102 if (CommandLine::ForCurrentProcess()->HasSwitch(
103 switches::kForceRendererAccessibility) || 103 switches::kForceRendererAccessibility) ||
104 Singleton<BrowserAccessibilityState>()->IsAccessibleBrowser()) { 104 BrowserAccessibilityState::GetInstance()->IsAccessibleBrowser()) {
105 EnableRendererAccessibility(); 105 EnableRendererAccessibility();
106 } 106 }
107 } 107 }
108 108
109 RenderWidgetHost::~RenderWidgetHost() { 109 RenderWidgetHost::~RenderWidgetHost() {
110 // Clear our current or cached backing store if either remains. 110 // Clear our current or cached backing store if either remains.
111 BackingStoreManager::RemoveBackingStore(this); 111 BackingStoreManager::RemoveBackingStore(this);
112 112
113 process_->Release(routing_id_); 113 process_->Release(routing_id_);
114 } 114 }
(...skipping 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 return; 1231 return;
1232 1232
1233 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) { 1233 for (int i = 0; i < static_cast<int>(deferred_plugin_handles_.size()); i++) {
1234 #if defined(TOOLKIT_USES_GTK) 1234 #if defined(TOOLKIT_USES_GTK)
1235 view_->CreatePluginContainer(deferred_plugin_handles_[i]); 1235 view_->CreatePluginContainer(deferred_plugin_handles_[i]);
1236 #endif 1236 #endif
1237 } 1237 }
1238 1238
1239 deferred_plugin_handles_.clear(); 1239 deferred_plugin_handles_.clear();
1240 } 1240 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698