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

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

Issue 2093963003: [ash-md] Uses 'Chrome - <title>' format for browser windows in overview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Uses 'Chrome - <title>' format for browser windows in overview (comment) Created 4 years, 5 months 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 // that doesn't have the modal dialog the windows keep trying to get the focus 1647 // that doesn't have the modal dialog the windows keep trying to get the focus
1648 // from each other on Windows. http://crbug.com/141650. 1648 // from each other on Windows. http://crbug.com/141650.
1649 base::ThreadTaskRunnerHandle::Get()->PostTask( 1649 base::ThreadTaskRunnerHandle::Get()->PostTask(
1650 FROM_HERE, base::Bind(&BrowserView::ActivateAppModalDialog, 1650 FROM_HERE, base::Bind(&BrowserView::ActivateAppModalDialog,
1651 activate_modal_dialog_factory_.GetWeakPtr())); 1651 activate_modal_dialog_factory_.GetWeakPtr()));
1652 #endif 1652 #endif
1653 return false; 1653 return false;
1654 } 1654 }
1655 1655
1656 base::string16 BrowserView::GetWindowTitle() const { 1656 base::string16 BrowserView::GetWindowTitle() const {
1657 return browser_->GetWindowTitleForCurrentTab(); 1657 return browser_->GetWindowTitleForCurrentTab(true /* include_app_name */);
1658 } 1658 }
1659 1659
1660 base::string16 BrowserView::GetAccessibleWindowTitle() const { 1660 base::string16 BrowserView::GetAccessibleWindowTitle() const {
1661 const bool include_app_name = false;
1661 if (IsOffTheRecord()) { 1662 if (IsOffTheRecord()) {
1662 return l10n_util::GetStringFUTF16( 1663 return l10n_util::GetStringFUTF16(
1663 IDS_ACCESSIBLE_INCOGNITO_WINDOW_TITLE_FORMAT, 1664 IDS_ACCESSIBLE_INCOGNITO_WINDOW_TITLE_FORMAT,
1664 GetWindowTitle()); 1665 browser_->GetWindowTitleForCurrentTab(include_app_name));
1665 } 1666 }
1666 return GetWindowTitle(); 1667 return browser_->GetWindowTitleForCurrentTab(include_app_name);
1667 } 1668 }
1668 1669
1669 views::View* BrowserView::GetInitiallyFocusedView() { 1670 views::View* BrowserView::GetInitiallyFocusedView() {
1670 return nullptr; 1671 return nullptr;
1671 } 1672 }
1672 1673
1673 bool BrowserView::ShouldShowWindowTitle() const { 1674 bool BrowserView::ShouldShowWindowTitle() const {
1674 #if defined(USE_ASH) 1675 #if defined(USE_ASH)
1675 // For Ash only, trusted windows (apps and settings) do not show a title, 1676 // For Ash only, trusted windows (apps and settings) do not show a title,
1676 // crbug.com/119411. Child windows (i.e. popups) do show a title. 1677 // crbug.com/119411. Child windows (i.e. popups) do show a title.
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 } 2653 }
2653 2654
2654 extensions::ActiveTabPermissionGranter* 2655 extensions::ActiveTabPermissionGranter*
2655 BrowserView::GetActiveTabPermissionGranter() { 2656 BrowserView::GetActiveTabPermissionGranter() {
2656 content::WebContents* web_contents = GetActiveWebContents(); 2657 content::WebContents* web_contents = GetActiveWebContents();
2657 if (!web_contents) 2658 if (!web_contents)
2658 return nullptr; 2659 return nullptr;
2659 return extensions::TabHelper::FromWebContents(web_contents) 2660 return extensions::TabHelper::FromWebContents(web_contents)
2660 ->active_tab_permission_granter(); 2661 ->active_tab_permission_granter();
2661 } 2662 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698