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

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

Issue 2473863004: Remove MaterialDesignController::IsModeMaterial (Closed)
Patch Set: pkasting review and rebase Created 4 years, 1 month 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #include "ui/base/material_design/material_design_controller.h" 131 #include "ui/base/material_design/material_design_controller.h"
132 #include "ui/base/resource/resource_bundle.h" 132 #include "ui/base/resource/resource_bundle.h"
133 #include "ui/base/theme_provider.h" 133 #include "ui/base/theme_provider.h"
134 #include "ui/content_accelerators/accelerator_util.h" 134 #include "ui/content_accelerators/accelerator_util.h"
135 #include "ui/display/screen.h" 135 #include "ui/display/screen.h"
136 #include "ui/events/event_utils.h" 136 #include "ui/events/event_utils.h"
137 #include "ui/gfx/canvas.h" 137 #include "ui/gfx/canvas.h"
138 #include "ui/gfx/color_utils.h" 138 #include "ui/gfx/color_utils.h"
139 #include "ui/gfx/geometry/rect_conversions.h" 139 #include "ui/gfx/geometry/rect_conversions.h"
140 #include "ui/gfx/scoped_canvas.h" 140 #include "ui/gfx/scoped_canvas.h"
141 #include "ui/native_theme/native_theme_dark_aura.h"
141 #include "ui/strings/grit/ui_strings.h" 142 #include "ui/strings/grit/ui_strings.h"
142 #include "ui/views/controls/button/menu_button.h" 143 #include "ui/views/controls/button/menu_button.h"
143 #include "ui/views/controls/textfield/textfield.h" 144 #include "ui/views/controls/textfield/textfield.h"
144 #include "ui/views/controls/webview/webview.h" 145 #include "ui/views/controls/webview/webview.h"
145 #include "ui/views/focus/external_focus_tracker.h" 146 #include "ui/views/focus/external_focus_tracker.h"
146 #include "ui/views/focus/view_storage.h" 147 #include "ui/views/focus/view_storage.h"
147 #include "ui/views/layout/grid_layout.h" 148 #include "ui/views/layout/grid_layout.h"
148 #include "ui/views/widget/native_widget.h" 149 #include "ui/views/widget/native_widget.h"
149 #include "ui/views/widget/root_view.h" 150 #include "ui/views/widget/root_view.h"
150 #include "ui/views/widget/widget.h" 151 #include "ui/views/widget/widget.h"
(...skipping 11 matching lines...) Expand all
162 #include "ui/aura/client/window_parenting_client.h" 163 #include "ui/aura/client/window_parenting_client.h"
163 #include "ui/aura/window.h" 164 #include "ui/aura/window.h"
164 #include "ui/aura/window_tree_host.h" 165 #include "ui/aura/window_tree_host.h"
165 #endif 166 #endif
166 167
167 #if defined(OS_WIN) 168 #if defined(OS_WIN)
168 #include "base/win/windows_version.h" 169 #include "base/win/windows_version.h"
169 #include "chrome/browser/win/jumplist.h" 170 #include "chrome/browser/win/jumplist.h"
170 #include "chrome/browser/win/jumplist_factory.h" 171 #include "chrome/browser/win/jumplist_factory.h"
171 #include "ui/gfx/color_palette.h" 172 #include "ui/gfx/color_palette.h"
172 #include "ui/native_theme/native_theme_dark_win.h" 173 #include "ui/native_theme/native_theme_win.h"
173 #include "ui/views/win/scoped_fullscreen_visibility.h" 174 #include "ui/views/win/scoped_fullscreen_visibility.h"
174 #endif 175 #endif
175 176
176 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) 177 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN)
177 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h" 178 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h"
178 #include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h" 179 #include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h"
179 #endif 180 #endif
180 181
181 #if defined(OS_LINUX) 182 #if defined(OS_LINUX)
182 #include "ui/native_theme/native_theme_dark_aura.h"
183 #endif 183 #endif
184 184
185 using base::TimeDelta; 185 using base::TimeDelta;
186 using base::UserMetricsAction; 186 using base::UserMetricsAction;
187 using content::NativeWebKeyboardEvent; 187 using content::NativeWebKeyboardEvent;
188 using content::WebContents; 188 using content::WebContents;
189 using views::ColumnSet; 189 using views::ColumnSet;
190 using views::GridLayout; 190 using views::GridLayout;
191 using web_modal::WebContentsModalDialogHost; 191 using web_modal::WebContentsModalDialogHost;
192 192
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) { 1899 void BrowserView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
1900 node_data->role = ui::AX_ROLE_CLIENT; 1900 node_data->role = ui::AX_ROLE_CLIENT;
1901 } 1901 }
1902 1902
1903 void BrowserView::OnThemeChanged() { 1903 void BrowserView::OnThemeChanged() {
1904 if (!IsRegularOrGuestSession()) { 1904 if (!IsRegularOrGuestSession()) {
1905 // When the theme changes, the native theme may also change (in incognito, 1905 // When the theme changes, the native theme may also change (in incognito,
1906 // the usage of dark or normal hinges on the browser theme), so we have to 1906 // the usage of dark or normal hinges on the browser theme), so we have to
1907 // propagate both kinds of change. 1907 // propagate both kinds of change.
1908 base::AutoReset<bool> reset(&handling_theme_changed_, true); 1908 base::AutoReset<bool> reset(&handling_theme_changed_, true);
1909 ui::NativeThemeDarkAura::instance()->NotifyObservers();
1909 #if defined(OS_WIN) 1910 #if defined(OS_WIN)
1910 ui::NativeThemeDarkWin::instance()->NotifyObservers();
1911 ui::NativeThemeWin::instance()->NotifyObservers(); 1911 ui::NativeThemeWin::instance()->NotifyObservers();
1912 #elif defined(OS_LINUX) 1912 #elif defined(OS_LINUX)
1913 ui::NativeThemeDarkAura::instance()->NotifyObservers();
1914 ui::NativeThemeAura::instance()->NotifyObservers(); 1913 ui::NativeThemeAura::instance()->NotifyObservers();
1915 #endif 1914 #endif
1916 } 1915 }
1917 1916
1918 views::View::OnThemeChanged(); 1917 views::View::OnThemeChanged();
1919 } 1918 }
1920 1919
1921 void BrowserView::OnNativeThemeChanged(const ui::NativeTheme* theme) { 1920 void BrowserView::OnNativeThemeChanged(const ui::NativeTheme* theme) {
1922 // Do not handle native theme changes before the browser view is initialized. 1921 // Do not handle native theme changes before the browser view is initialized.
1923 if (!initialized_) 1922 if (!initialized_)
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 } 2588 }
2590 2589
2591 extensions::ActiveTabPermissionGranter* 2590 extensions::ActiveTabPermissionGranter*
2592 BrowserView::GetActiveTabPermissionGranter() { 2591 BrowserView::GetActiveTabPermissionGranter() {
2593 content::WebContents* web_contents = GetActiveWebContents(); 2592 content::WebContents* web_contents = GetActiveWebContents();
2594 if (!web_contents) 2593 if (!web_contents)
2595 return nullptr; 2594 return nullptr;
2596 return extensions::TabHelper::FromWebContents(web_contents) 2595 return extensions::TabHelper::FromWebContents(web_contents)
2597 ->active_tab_permission_granter(); 2596 ->active_tab_permission_granter();
2598 } 2597 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame.cc ('k') | chrome/browser/ui/views/infobars/infobar_background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698