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

Side by Side Diff: chrome/browser/ui/webui/extensions/extensions_ui.cc

Issue 2541063002: Revert of Remove about:srcdoc url conversion. (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/webui/extensions/extensions_ui.h" 5 #include "chrome/browser/ui/webui/extensions/extensions_ui.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 class ExtensionWebUiTimer : public content::WebContentsObserver { 43 class ExtensionWebUiTimer : public content::WebContentsObserver {
44 public: 44 public:
45 explicit ExtensionWebUiTimer(content::WebContents* web_contents, bool is_md) 45 explicit ExtensionWebUiTimer(content::WebContents* web_contents, bool is_md)
46 : content::WebContentsObserver(web_contents), is_md_(is_md) {} 46 : content::WebContentsObserver(web_contents), is_md_(is_md) {}
47 ~ExtensionWebUiTimer() override {} 47 ~ExtensionWebUiTimer() override {}
48 48
49 void DidStartProvisionalLoadForFrame( 49 void DidStartProvisionalLoadForFrame(
50 content::RenderFrameHost* render_frame_host, 50 content::RenderFrameHost* render_frame_host,
51 const GURL& validated_url, 51 const GURL& validated_url,
52 bool is_error_page) override { 52 bool is_error_page,
53 bool is_iframe_srcdoc) override {
53 timer_.reset(new base::ElapsedTimer()); 54 timer_.reset(new base::ElapsedTimer());
54 } 55 }
55 56
56 void DocumentLoadedInFrame( 57 void DocumentLoadedInFrame(
57 content::RenderFrameHost* render_frame_host) override { 58 content::RenderFrameHost* render_frame_host) override {
58 if (render_frame_host != web_contents()->GetMainFrame() || 59 if (render_frame_host != web_contents()->GetMainFrame() ||
59 !timer_) { // See comment in DocumentOnLoadCompletedInMainFrame() 60 !timer_) { // See comment in DocumentOnLoadCompletedInMainFrame()
60 return; 61 return;
61 } 62 }
62 if (is_md_) { 63 if (is_md_) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 ExtensionsUI::~ExtensionsUI() {} 339 ExtensionsUI::~ExtensionsUI() {}
339 340
340 // static 341 // static
341 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes( 342 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes(
342 ui::ScaleFactor scale_factor) { 343 ui::ScaleFactor scale_factor) {
343 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 344 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
344 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor); 345 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor);
345 } 346 }
346 347
347 } // namespace extensions 348 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('k') | chrome/browser/ui/webui/options/options_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698