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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 2552903003: Remove unreleased web app frame code from ChromeOS (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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 } 1604 }
1605 1605
1606 views::View* BrowserView::GetInitiallyFocusedView() { 1606 views::View* BrowserView::GetInitiallyFocusedView() {
1607 return nullptr; 1607 return nullptr;
1608 } 1608 }
1609 1609
1610 bool BrowserView::ShouldShowWindowTitle() const { 1610 bool BrowserView::ShouldShowWindowTitle() const {
1611 #if defined(USE_ASH) 1611 #if defined(USE_ASH)
1612 // For Ash only, trusted windows (apps and settings) do not show a title, 1612 // For Ash only, trusted windows (apps and settings) do not show a title,
1613 // crbug.com/119411. Child windows (i.e. popups) do show a title. 1613 // crbug.com/119411. Child windows (i.e. popups) do show a title.
1614 if (browser_->is_trusted_source() && 1614 if (browser_->is_trusted_source())
1615 !browser_->SupportsWindowFeature(Browser::FEATURE_WEBAPPFRAME))
1616 return false; 1615 return false;
1617 #endif // USE_ASH 1616 #endif // USE_ASH
1618 1617
1619 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); 1618 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR);
1620 } 1619 }
1621 1620
1622 gfx::ImageSkia BrowserView::GetWindowAppIcon() { 1621 gfx::ImageSkia BrowserView::GetWindowAppIcon() {
1623 if (browser_->is_app()) { 1622 if (browser_->is_app()) {
1624 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); 1623 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents();
1625 extensions::TabHelper* extensions_tab_helper = 1624 extensions::TabHelper* extensions_tab_helper =
(...skipping 13 matching lines...) Expand all
1639 1638
1640 if (browser_->is_app() || browser_->is_type_popup()) 1639 if (browser_->is_app() || browser_->is_type_popup())
1641 return browser_->GetCurrentPageIcon().AsImageSkia(); 1640 return browser_->GetCurrentPageIcon().AsImageSkia();
1642 return gfx::ImageSkia(); 1641 return gfx::ImageSkia();
1643 } 1642 }
1644 1643
1645 bool BrowserView::ShouldShowWindowIcon() const { 1644 bool BrowserView::ShouldShowWindowIcon() const {
1646 #if defined(USE_ASH) 1645 #if defined(USE_ASH)
1647 // For Ash only, trusted windows (apps and settings) do not show an icon, 1646 // For Ash only, trusted windows (apps and settings) do not show an icon,
1648 // crbug.com/119411. Child windows (i.e. popups) do show an icon. 1647 // crbug.com/119411. Child windows (i.e. popups) do show an icon.
1649 if (browser_->is_trusted_source() && 1648 if (browser_->is_trusted_source())
1650 !browser_->SupportsWindowFeature(Browser::FEATURE_WEBAPPFRAME))
1651 return false; 1649 return false;
1652 #endif // USE_ASH 1650 #endif // USE_ASH
1653 1651
1654 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); 1652 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR);
1655 } 1653 }
1656 1654
1657 bool BrowserView::ExecuteWindowsCommand(int command_id) { 1655 bool BrowserView::ExecuteWindowsCommand(int command_id) {
1658 // This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND. 1656 // This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND.
1659 #if defined(OS_WIN) 1657 #if defined(OS_WIN)
1660 if (command_id == IDC_DEBUG_FRAME_TOGGLE) 1658 if (command_id == IDC_DEBUG_FRAME_TOGGLE)
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 } 2594 }
2597 2595
2598 extensions::ActiveTabPermissionGranter* 2596 extensions::ActiveTabPermissionGranter*
2599 BrowserView::GetActiveTabPermissionGranter() { 2597 BrowserView::GetActiveTabPermissionGranter() {
2600 content::WebContents* web_contents = GetActiveWebContents(); 2598 content::WebContents* web_contents = GetActiveWebContents();
2601 if (!web_contents) 2599 if (!web_contents)
2602 return nullptr; 2600 return nullptr;
2603 return extensions::TabHelper::FromWebContents(web_contents) 2601 return extensions::TabHelper::FromWebContents(web_contents)
2604 ->active_tab_permission_granter(); 2602 ->active_tab_permission_granter();
2605 } 2603 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698