OLD | NEW |
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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1530 TabContents* contents = chrome::GetActiveTabContents(browser_.get()); | 1530 TabContents* contents = chrome::GetActiveTabContents(browser_.get()); |
1531 if (contents && contents->extension_tab_helper()->GetExtensionAppIcon()) | 1531 if (contents && contents->extension_tab_helper()->GetExtensionAppIcon()) |
1532 return *contents->extension_tab_helper()->GetExtensionAppIcon(); | 1532 return *contents->extension_tab_helper()->GetExtensionAppIcon(); |
1533 } | 1533 } |
1534 | 1534 |
1535 return GetWindowIcon(); | 1535 return GetWindowIcon(); |
1536 } | 1536 } |
1537 | 1537 |
1538 gfx::ImageSkia BrowserView::GetWindowIcon() { | 1538 gfx::ImageSkia BrowserView::GetWindowIcon() { |
1539 if (browser_->is_app()) | 1539 if (browser_->is_app()) |
1540 return browser_->GetCurrentPageIcon(); | 1540 return browser_->GetCurrentPageIcon().AsImageSkia(); |
1541 return gfx::ImageSkia(); | 1541 return gfx::ImageSkia(); |
1542 } | 1542 } |
1543 | 1543 |
1544 bool BrowserView::ShouldShowWindowIcon() const { | 1544 bool BrowserView::ShouldShowWindowIcon() const { |
1545 #if defined(USE_ASH) | 1545 #if defined(USE_ASH) |
1546 // For Ash only, app host windows do not show an icon, crbug.com/119411. | 1546 // For Ash only, app host windows do not show an icon, crbug.com/119411. |
1547 // Child windows (e.g. extension panels, popups) do show an icon. | 1547 // Child windows (e.g. extension panels, popups) do show an icon. |
1548 if (browser_->is_app() && browser_->app_type() == Browser::APP_TYPE_HOST) | 1548 if (browser_->is_app() && browser_->app_type() == Browser::APP_TYPE_HOST) |
1549 return false; | 1549 return false; |
1550 #endif | 1550 #endif |
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2604 | 2604 |
2605 Browser* modal_browser = | 2605 Browser* modal_browser = |
2606 browser::FindBrowserWithWebContents(active_dialog->web_contents()); | 2606 browser::FindBrowserWithWebContents(active_dialog->web_contents()); |
2607 if (modal_browser && (browser_ != modal_browser)) { | 2607 if (modal_browser && (browser_ != modal_browser)) { |
2608 modal_browser->window()->FlashFrame(true); | 2608 modal_browser->window()->FlashFrame(true); |
2609 modal_browser->window()->Activate(); | 2609 modal_browser->window()->Activate(); |
2610 } | 2610 } |
2611 | 2611 |
2612 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); | 2612 AppModalDialogQueue::GetInstance()->ActivateModalDialog(); |
2613 } | 2613 } |
OLD | NEW |