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

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

Issue 2697513008: Linux Aura: Use Aura theme on all windows when 'Use Classic theme' is used (Closed)
Patch Set: No namespace Created 3 years, 10 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
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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 #if defined(OS_CHROMEOS) 149 #if defined(OS_CHROMEOS)
150 #include "chrome/browser/ui/ash/ash_util.h" 150 #include "chrome/browser/ui/ash/ash_util.h"
151 #endif // defined(OS_CHROMEOS) 151 #endif // defined(OS_CHROMEOS)
152 152
153 #if !defined(OS_CHROMEOS) 153 #if !defined(OS_CHROMEOS)
154 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 154 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
155 #endif // !defined(OS_CHROMEOS) 155 #endif // !defined(OS_CHROMEOS)
156 156
157 #if defined(USE_AURA) 157 #if defined(USE_AURA)
158 #include "chrome/browser/ui/views/theme_profile_key.h"
158 #include "ui/aura/client/window_parenting_client.h" 159 #include "ui/aura/client/window_parenting_client.h"
159 #include "ui/aura/window.h" 160 #include "ui/aura/window.h"
160 #include "ui/aura/window_tree_host.h" 161 #include "ui/aura/window_tree_host.h"
161 #endif 162 #endif
162 163
163 #if defined(OS_WIN) 164 #if defined(OS_WIN)
164 #include "base/win/windows_version.h" 165 #include "base/win/windows_version.h"
165 #include "chrome/browser/win/jumplist.h" 166 #include "chrome/browser/win/jumplist.h"
166 #include "chrome/browser/win/jumplist_factory.h" 167 #include "chrome/browser/win/jumplist_factory.h"
167 #include "ui/gfx/color_palette.h" 168 #include "ui/gfx/color_palette.h"
168 #include "ui/native_theme/native_theme_win.h" 169 #include "ui/native_theme/native_theme_win.h"
169 #include "ui/views/win/scoped_fullscreen_visibility.h" 170 #include "ui/views/win/scoped_fullscreen_visibility.h"
170 #endif 171 #endif
171 172
172 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN) 173 #if BUILDFLAG(ENABLE_ONE_CLICK_SIGNIN)
173 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h" 174 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h"
174 #include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h" 175 #include "chrome/browser/ui/views/sync/one_click_signin_dialog_view.h"
175 #endif 176 #endif
176 177
177 #if defined(OS_LINUX)
178 #endif
179
180 using base::TimeDelta; 178 using base::TimeDelta;
181 using base::UserMetricsAction; 179 using base::UserMetricsAction;
182 using content::NativeWebKeyboardEvent; 180 using content::NativeWebKeyboardEvent;
183 using content::WebContents; 181 using content::WebContents;
184 using views::ColumnSet; 182 using views::ColumnSet;
185 using views::GridLayout; 183 using views::GridLayout;
186 using web_modal::WebContentsModalDialogHost; 184 using web_modal::WebContentsModalDialogHost;
187 185
188 namespace { 186 namespace {
189 187
(...skipping 1834 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 2022
2025 // Stow a pointer to this object onto the window handle so that we can get at 2023 // Stow a pointer to this object onto the window handle so that we can get at
2026 // it later when all we have is a native view. 2024 // it later when all we have is a native view.
2027 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this); 2025 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this);
2028 2026
2029 // Stow a pointer to the browser's profile onto the window handle so that we 2027 // Stow a pointer to the browser's profile onto the window handle so that we
2030 // can get it later when all we have is a native view. 2028 // can get it later when all we have is a native view.
2031 GetWidget()->SetNativeWindowProperty(Profile::kProfileKey, 2029 GetWidget()->SetNativeWindowProperty(Profile::kProfileKey,
2032 browser_->profile()); 2030 browser_->profile());
2033 2031
2032 #if defined(USE_AURA)
2033 // Stow a pointer to the browser's original profile onto the window handle so
2034 // that windows will be styled with the appropriate NativeTheme.
2035 SetThemeProfileForWindow(GetNativeWindow(),
2036 browser_->profile()->GetOriginalProfile());
2037 #endif
2038
2034 LoadAccelerators(); 2039 LoadAccelerators();
2035 2040
2036 contents_web_view_ = new ContentsWebView(browser_->profile()); 2041 contents_web_view_ = new ContentsWebView(browser_->profile());
2037 contents_web_view_->set_id(VIEW_ID_TAB_CONTAINER); 2042 contents_web_view_->set_id(VIEW_ID_TAB_CONTAINER);
2038 contents_web_view_->SetEmbedFullscreenWidgetMode(true); 2043 contents_web_view_->SetEmbedFullscreenWidgetMode(true);
2039 2044
2040 web_contents_close_handler_.reset( 2045 web_contents_close_handler_.reset(
2041 new WebContentsCloseHandler(contents_web_view_)); 2046 new WebContentsCloseHandler(contents_web_view_));
2042 2047
2043 devtools_web_view_ = new views::WebView(browser_->profile()); 2048 devtools_web_view_ = new views::WebView(browser_->profile());
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2630 } 2635 }
2631 2636
2632 extensions::ActiveTabPermissionGranter* 2637 extensions::ActiveTabPermissionGranter*
2633 BrowserView::GetActiveTabPermissionGranter() { 2638 BrowserView::GetActiveTabPermissionGranter() {
2634 content::WebContents* web_contents = GetActiveWebContents(); 2639 content::WebContents* web_contents = GetActiveWebContents();
2635 if (!web_contents) 2640 if (!web_contents)
2636 return nullptr; 2641 return nullptr;
2637 return extensions::TabHelper::FromWebContents(web_contents) 2642 return extensions::TabHelper::FromWebContents(web_contents)
2638 ->active_tab_permission_granter(); 2643 ->active_tab_permission_granter();
2639 } 2644 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/theme_profile_key.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698