Skip to content

Commit

Permalink
Set the custom app icon for devtools in BrowserView::GetWindowIcon()
Browse files Browse the repository at this point in the history
The purpose of this CL is to reduce the number of places which set the
NavigationEntry's favicon data

BUG=517089
TEST=None

Review URL: https://codereview.chromium.org/1271303003

Cr-Commit-Position: refs/heads/master@{#342667}
  • Loading branch information
pkotwicz authored and Commit bot committed Aug 10, 2015
1 parent e88efeb commit d241db3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 0 additions & 7 deletions chrome/browser/devtools/devtools_ui_bindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar.h"
#include "components/ui/zoom/page_zoom.h"
#include "content/public/browser/favicon_status.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
Expand Down Expand Up @@ -391,12 +390,6 @@ DevToolsUIBindings::DevToolsUIBindings(content::WebContents* web_contents)
extensions::ChromeExtensionWebContentsObserver::CreateForWebContents(
web_contents_);

// Wipe out page icon so that the default application icon is used.
content::NavigationEntry* entry =
web_contents_->GetController().GetActiveEntry();
entry->GetFavicon().image = gfx::Image();
entry->GetFavicon().valid = true;

// Register on-load actions.
embedder_message_dispatcher_.reset(
DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this));
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/ui/views/frame/browser_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,10 @@ gfx::ImageSkia BrowserView::GetWindowAppIcon() {
}

gfx::ImageSkia BrowserView::GetWindowIcon() {
// Use the default icon for devtools.
if (browser_->is_devtools())
return gfx::ImageSkia();

if (browser_->is_app() || browser_->is_type_popup())
return browser_->GetCurrentPageIcon().AsImageSkia();
return gfx::ImageSkia();
Expand Down

0 comments on commit d241db3

Please sign in to comment.