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

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

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Rebase 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, 52 bool is_error_page) override {
53 bool is_iframe_srcdoc) override {
54 timer_.reset(new base::ElapsedTimer()); 53 timer_.reset(new base::ElapsedTimer());
55 } 54 }
56 55
57 void DocumentLoadedInFrame( 56 void DocumentLoadedInFrame(
58 content::RenderFrameHost* render_frame_host) override { 57 content::RenderFrameHost* render_frame_host) override {
59 if (render_frame_host != web_contents()->GetMainFrame() || 58 if (render_frame_host != web_contents()->GetMainFrame() ||
60 !timer_) { // See comment in DocumentOnLoadCompletedInMainFrame() 59 !timer_) { // See comment in DocumentOnLoadCompletedInMainFrame()
61 return; 60 return;
62 } 61 }
63 if (is_md_) { 62 if (is_md_) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ExtensionsUI::~ExtensionsUI() {} 338 ExtensionsUI::~ExtensionsUI() {}
340 339
341 // static 340 // static
342 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes( 341 base::RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes(
343 ui::ScaleFactor scale_factor) { 342 ui::ScaleFactor scale_factor) {
344 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 343 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
345 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor); 344 return rb.LoadDataResourceBytesForScale(IDR_EXTENSIONS_FAVICON, scale_factor);
346 } 345 }
347 346
348 } // namespace extensions 347 } // 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