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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 274057: Add histogram for how tab closing time. Did some cleanup along the way. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 while (pos != std::string::npos) { 287 while (pos != std::string::npos) {
288 css.replace(pos, 12, hex_color_string); 288 css.replace(pos, 12, hex_color_string);
289 pos = css.find(kToolstripTextColorSubstitution); 289 pos = css.find(kToolstripTextColorSubstitution);
290 } 290 }
291 291
292 // As a toolstrip, inject our toolstrip CSS to make it easier for toolstrips 292 // As a toolstrip, inject our toolstrip CSS to make it easier for toolstrips
293 // to blend in with the chrome UI. 293 // to blend in with the chrome UI.
294 render_view_host()->InsertCSSInWebFrame(L"", css, "ToolstripThemeCSS"); 294 render_view_host()->InsertCSSInWebFrame(L"", css, "ToolstripThemeCSS");
295 } 295 }
296 296
297 void ExtensionHost::DidStopLoading(RenderViewHost* render_view_host) { 297 void ExtensionHost::DidStopLoading() {
298 bool notify = !did_stop_loading_; 298 bool notify = !did_stop_loading_;
299 did_stop_loading_ = true; 299 did_stop_loading_ = true;
300 if (extension_host_type_ == ViewType::EXTENSION_TOOLSTRIP || 300 if (extension_host_type_ == ViewType::EXTENSION_TOOLSTRIP ||
301 extension_host_type_ == ViewType::EXTENSION_MOLE || 301 extension_host_type_ == ViewType::EXTENSION_MOLE ||
302 extension_host_type_ == ViewType::EXTENSION_POPUP) { 302 extension_host_type_ == ViewType::EXTENSION_POPUP) {
303 #if defined(TOOLKIT_VIEWS) 303 #if defined(TOOLKIT_VIEWS)
304 if (view_.get()) 304 if (view_.get())
305 view_->DidStopLoading(); 305 view_->DidStopLoading();
306 #endif 306 #endif
307 } 307 }
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 window_id = ExtensionTabUtil::GetWindowId( 515 window_id = ExtensionTabUtil::GetWindowId(
516 const_cast<ExtensionHost* >(this)->GetBrowser()); 516 const_cast<ExtensionHost* >(this)->GetBrowser());
517 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) { 517 } else if (extension_host_type_ == ViewType::EXTENSION_BACKGROUND_PAGE) {
518 // Background page is not attached to any browser window, so pass -1. 518 // Background page is not attached to any browser window, so pass -1.
519 window_id = -1; 519 window_id = -1;
520 } else { 520 } else {
521 NOTREACHED(); 521 NOTREACHED();
522 } 522 }
523 return window_id; 523 return window_id;
524 } 524 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698