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

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

Issue 2127143002: Integrate audible tab tracking into desktop engagement service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/views/frame/browser_frame.cc ('k') | chrome/chrome_browser.gypi » ('j') | 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 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 // BrowserView. By destroying here we ensure all said classes are valid. 1807 // BrowserView. By destroying here we ensure all said classes are valid.
1808 ScopedVector<content::WebContents> contents; 1808 ScopedVector<content::WebContents> contents;
1809 while (browser()->tab_strip_model()->count()) 1809 while (browser()->tab_strip_model()->count())
1810 contents.push_back(browser()->tab_strip_model()->DetachWebContentsAt(0)); 1810 contents.push_back(browser()->tab_strip_model()->DetachWebContentsAt(0));
1811 } 1811 }
1812 1812
1813 void BrowserView::OnWidgetActivationChanged(views::Widget* widget, 1813 void BrowserView::OnWidgetActivationChanged(views::Widget* widget,
1814 bool active) { 1814 bool active) {
1815 if (active) 1815 if (active)
1816 BrowserList::SetLastActive(browser_.get()); 1816 BrowserList::SetLastActive(browser_.get());
1817 else
1818 BrowserList::NotifyBrowserNoLongerActive(browser_.get());
1817 1819
1818 if (!extension_keybinding_registry_ && 1820 if (!extension_keybinding_registry_ &&
1819 GetFocusManager()) { // focus manager can be null in tests. 1821 GetFocusManager()) { // focus manager can be null in tests.
1820 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 1822 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
1821 browser_->profile(), GetFocusManager(), 1823 browser_->profile(), GetFocusManager(),
1822 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS, this)); 1824 extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS, this));
1823 } 1825 }
1824 1826
1825 extensions::ExtensionCommandsGlobalRegistry* registry = 1827 extensions::ExtensionCommandsGlobalRegistry* registry =
1826 extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()); 1828 extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
2653 } 2655 }
2654 2656
2655 extensions::ActiveTabPermissionGranter* 2657 extensions::ActiveTabPermissionGranter*
2656 BrowserView::GetActiveTabPermissionGranter() { 2658 BrowserView::GetActiveTabPermissionGranter() {
2657 content::WebContents* web_contents = GetActiveWebContents(); 2659 content::WebContents* web_contents = GetActiveWebContents();
2658 if (!web_contents) 2660 if (!web_contents)
2659 return nullptr; 2661 return nullptr;
2660 return extensions::TabHelper::FromWebContents(web_contents) 2662 return extensions::TabHelper::FromWebContents(web_contents)
2661 ->active_tab_permission_granter(); 2663 ->active_tab_permission_granter();
2662 } 2664 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698