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

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

Issue 519036: Fixes bug where recreating the document element via altering |documentElement... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 UMA_HISTOGRAM_TIMES("Extensions.PopupLoadTime", 348 UMA_HISTOGRAM_TIMES("Extensions.PopupLoadTime",
349 since_created_.Elapsed()); 349 since_created_.Elapsed());
350 } else if (extension_host_type_ == ViewType::EXTENSION_TOOLSTRIP) { 350 } else if (extension_host_type_ == ViewType::EXTENSION_TOOLSTRIP) {
351 UMA_HISTOGRAM_TIMES("Extensions.ToolstripLoadTime", 351 UMA_HISTOGRAM_TIMES("Extensions.ToolstripLoadTime",
352 since_created_.Elapsed()); 352 since_created_.Elapsed());
353 } 353 }
354 } 354 }
355 } 355 }
356 356
357 void ExtensionHost::DocumentAvailableInMainFrame(RenderViewHost* rvh) { 357 void ExtensionHost::DocumentAvailableInMainFrame(RenderViewHost* rvh) {
358 // If the document has already been marked as available for this host, then
359 // bail. No need for the redundant setup. http://crbug.com/31170
360 if (document_element_available_)
361 return;
362
358 document_element_available_ = true; 363 document_element_available_ = true;
359 if (is_background_page()) { 364 if (is_background_page()) {
360 extension_->SetBackgroundPageReady(); 365 extension_->SetBackgroundPageReady();
361 } else { 366 } else {
362 InsertThemeCSS(); 367 InsertThemeCSS();
363 368
364 // Listen for browser changes so we can resend the CSS. 369 // Listen for browser changes so we can resend the CSS.
365 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED, 370 registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
366 NotificationService::AllSources()); 371 NotificationService::AllSources());
367 } 372 }
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 // Extensions hosted in ExternalTabContainer objects may not have 630 // Extensions hosted in ExternalTabContainer objects may not have
626 // an associated browser. 631 // an associated browser.
627 Browser* browser = GetBrowser(); 632 Browser* browser = GetBrowser();
628 if (browser) 633 if (browser)
629 window_id = ExtensionTabUtil::GetWindowId(browser); 634 window_id = ExtensionTabUtil::GetWindowId(browser);
630 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 635 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
631 NOTREACHED(); 636 NOTREACHED();
632 } 637 }
633 return window_id; 638 return window_id;
634 } 639 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698