OLD | NEW |
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 1579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1590 #if defined(USE_AURA) && defined(OS_CHROMEOS) | 1590 #if defined(USE_AURA) && defined(OS_CHROMEOS) |
1591 // On Aura window manager controls all windows so settings focus via PostTask | 1591 // On Aura window manager controls all windows so settings focus via PostTask |
1592 // will make only worse because posted task will keep trying to steal focus. | 1592 // will make only worse because posted task will keep trying to steal focus. |
1593 queue->ActivateModalDialog(); | 1593 queue->ActivateModalDialog(); |
1594 #else | 1594 #else |
1595 // If another browser is app modal, flash and activate the modal browser. This | 1595 // If another browser is app modal, flash and activate the modal browser. This |
1596 // has to be done in a post task, otherwise if the user clicked on a window | 1596 // has to be done in a post task, otherwise if the user clicked on a window |
1597 // that doesn't have the modal dialog the windows keep trying to get the focus | 1597 // that doesn't have the modal dialog the windows keep trying to get the focus |
1598 // from each other on Windows. http://crbug.com/141650. | 1598 // from each other on Windows. http://crbug.com/141650. |
1599 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1599 base::ThreadTaskRunnerHandle::Get()->PostTask( |
1600 FROM_HERE, base::Bind(&BrowserView::ActivateAppModalDialog, | 1600 FROM_HERE, base::BindOnce(&BrowserView::ActivateAppModalDialog, |
1601 activate_modal_dialog_factory_.GetWeakPtr())); | 1601 activate_modal_dialog_factory_.GetWeakPtr())); |
1602 #endif | 1602 #endif |
1603 return false; | 1603 return false; |
1604 } | 1604 } |
1605 | 1605 |
1606 base::string16 BrowserView::GetWindowTitle() const { | 1606 base::string16 BrowserView::GetWindowTitle() const { |
1607 return browser_->GetWindowTitleForCurrentTab(true /* include_app_name */); | 1607 return browser_->GetWindowTitleForCurrentTab(true /* include_app_name */); |
1608 } | 1608 } |
1609 | 1609 |
1610 base::string16 BrowserView::GetAccessibleWindowTitle() const { | 1610 base::string16 BrowserView::GetAccessibleWindowTitle() const { |
1611 const bool include_app_name = false; | 1611 const bool include_app_name = false; |
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2686 } | 2686 } |
2687 | 2687 |
2688 extensions::ActiveTabPermissionGranter* | 2688 extensions::ActiveTabPermissionGranter* |
2689 BrowserView::GetActiveTabPermissionGranter() { | 2689 BrowserView::GetActiveTabPermissionGranter() { |
2690 content::WebContents* web_contents = GetActiveWebContents(); | 2690 content::WebContents* web_contents = GetActiveWebContents(); |
2691 if (!web_contents) | 2691 if (!web_contents) |
2692 return nullptr; | 2692 return nullptr; |
2693 return extensions::TabHelper::FromWebContents(web_contents) | 2693 return extensions::TabHelper::FromWebContents(web_contents) |
2694 ->active_tab_permission_granter(); | 2694 ->active_tab_permission_granter(); |
2695 } | 2695 } |
OLD | NEW |