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 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1966 Layout(); | 1966 Layout(); |
1967 } | 1967 } |
1968 | 1968 |
1969 void BrowserView::GetAccessibleState(ui::AXViewState* state) { | 1969 void BrowserView::GetAccessibleState(ui::AXViewState* state) { |
1970 state->role = ui::AX_ROLE_CLIENT; | 1970 state->role = ui::AX_ROLE_CLIENT; |
1971 } | 1971 } |
1972 | 1972 |
1973 void BrowserView::OnThemeChanged() { | 1973 void BrowserView::OnThemeChanged() { |
1974 if (!IsRegularOrGuestSession() && | 1974 if (!IsRegularOrGuestSession() && |
1975 ui::MaterialDesignController::IsModeMaterial()) { | 1975 ui::MaterialDesignController::IsModeMaterial()) { |
1976 // When the theme changes, the native theme may also change (in OTR, the | 1976 // When the theme changes, the native theme may also change (in incognito, |
1977 // usage of dark or normal hinges on the browser theme), so we have to | 1977 // the usage of dark or normal hinges on the browser theme), so we have to |
1978 // propagate both kinds of change. | 1978 // propagate both kinds of change. |
1979 base::AutoReset<bool> reset(&handling_theme_changed_, true); | 1979 base::AutoReset<bool> reset(&handling_theme_changed_, true); |
1980 #if defined(OS_WIN) | 1980 #if defined(OS_WIN) |
1981 ui::NativeThemeDarkWin::instance()->NotifyObservers(); | 1981 ui::NativeThemeDarkWin::instance()->NotifyObservers(); |
1982 ui::NativeThemeWin::instance()->NotifyObservers(); | 1982 ui::NativeThemeWin::instance()->NotifyObservers(); |
1983 #elif defined(OS_LINUX) | 1983 #elif defined(OS_LINUX) |
1984 ui::NativeThemeDarkAura::instance()->NotifyObservers(); | 1984 ui::NativeThemeDarkAura::instance()->NotifyObservers(); |
1985 ui::NativeThemeAura::instance()->NotifyObservers(); | 1985 ui::NativeThemeAura::instance()->NotifyObservers(); |
1986 #endif | 1986 #endif |
1987 } | 1987 } |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2653 } | 2653 } |
2654 | 2654 |
2655 extensions::ActiveTabPermissionGranter* | 2655 extensions::ActiveTabPermissionGranter* |
2656 BrowserView::GetActiveTabPermissionGranter() { | 2656 BrowserView::GetActiveTabPermissionGranter() { |
2657 content::WebContents* web_contents = GetActiveWebContents(); | 2657 content::WebContents* web_contents = GetActiveWebContents(); |
2658 if (!web_contents) | 2658 if (!web_contents) |
2659 return nullptr; | 2659 return nullptr; |
2660 return extensions::TabHelper::FromWebContents(web_contents) | 2660 return extensions::TabHelper::FromWebContents(web_contents) |
2661 ->active_tab_permission_granter(); | 2661 ->active_tab_permission_granter(); |
2662 } | 2662 } |
OLD | NEW |