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

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

Issue 2928803006: [Merge to M60] Linux Aura: Use Separate profile key specifically for theme usage (Closed)
Patch Set: Created 3 years, 6 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 #if defined(OS_CHROMEOS) 150 #if defined(OS_CHROMEOS)
151 #include "chrome/browser/ui/ash/ash_util.h" 151 #include "chrome/browser/ui/ash/ash_util.h"
152 #endif // defined(OS_CHROMEOS) 152 #endif // defined(OS_CHROMEOS)
153 153
154 #if !defined(OS_CHROMEOS) 154 #if !defined(OS_CHROMEOS)
155 #include "chrome/browser/ui/signin_view_controller.h" 155 #include "chrome/browser/ui/signin_view_controller.h"
156 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 156 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
157 #endif // !defined(OS_CHROMEOS) 157 #endif // !defined(OS_CHROMEOS)
158 158
159 #if defined(USE_AURA) 159 #if defined(USE_AURA)
160 #include "chrome/browser/ui/views/theme_profile_key.h"
160 #include "ui/aura/client/window_parenting_client.h" 161 #include "ui/aura/client/window_parenting_client.h"
161 #include "ui/aura/window.h" 162 #include "ui/aura/window.h"
162 #include "ui/aura/window_tree_host.h" 163 #include "ui/aura/window_tree_host.h"
163 #endif 164 #endif
164 165
165 #if defined(OS_WIN) 166 #if defined(OS_WIN)
166 #include "base/win/windows_version.h" 167 #include "base/win/windows_version.h"
167 #include "chrome/browser/win/jumplist.h" 168 #include "chrome/browser/win/jumplist.h"
168 #include "chrome/browser/win/jumplist_factory.h" 169 #include "chrome/browser/win/jumplist_factory.h"
169 #include "ui/gfx/color_palette.h" 170 #include "ui/gfx/color_palette.h"
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 2083
2083 // Stow a pointer to this object onto the window handle so that we can get at 2084 // Stow a pointer to this object onto the window handle so that we can get at
2084 // it later when all we have is a native view. 2085 // it later when all we have is a native view.
2085 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this); 2086 GetWidget()->SetNativeWindowProperty(kBrowserViewKey, this);
2086 2087
2087 // Stow a pointer to the browser's profile onto the window handle so that we 2088 // Stow a pointer to the browser's profile onto the window handle so that we
2088 // can get it later when all we have is a native view. 2089 // can get it later when all we have is a native view.
2089 GetWidget()->SetNativeWindowProperty(Profile::kProfileKey, 2090 GetWidget()->SetNativeWindowProperty(Profile::kProfileKey,
2090 browser_->profile()); 2091 browser_->profile());
2091 2092
2093 #if defined(USE_AURA)
2094 // Stow a pointer to the browser's profile onto the window handle so
2095 // that windows will be styled with the appropriate NativeTheme.
2096 SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
2097 #endif
2098
2092 LoadAccelerators(); 2099 LoadAccelerators();
2093 2100
2094 contents_web_view_ = new ContentsWebView(browser_->profile()); 2101 contents_web_view_ = new ContentsWebView(browser_->profile());
2095 contents_web_view_->set_id(VIEW_ID_TAB_CONTAINER); 2102 contents_web_view_->set_id(VIEW_ID_TAB_CONTAINER);
2096 contents_web_view_->SetEmbedFullscreenWidgetMode(true); 2103 contents_web_view_->SetEmbedFullscreenWidgetMode(true);
2097 2104
2098 web_contents_close_handler_.reset( 2105 web_contents_close_handler_.reset(
2099 new WebContentsCloseHandler(contents_web_view_)); 2106 new WebContentsCloseHandler(contents_web_view_));
2100 2107
2101 devtools_web_view_ = new views::WebView(browser_->profile()); 2108 devtools_web_view_ = new views::WebView(browser_->profile());
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 } 2700 }
2694 2701
2695 extensions::ActiveTabPermissionGranter* 2702 extensions::ActiveTabPermissionGranter*
2696 BrowserView::GetActiveTabPermissionGranter() { 2703 BrowserView::GetActiveTabPermissionGranter() {
2697 content::WebContents* web_contents = GetActiveWebContents(); 2704 content::WebContents* web_contents = GetActiveWebContents();
2698 if (!web_contents) 2705 if (!web_contents)
2699 return nullptr; 2706 return nullptr;
2700 return extensions::TabHelper::FromWebContents(web_contents) 2707 return extensions::TabHelper::FromWebContents(web_contents)
2701 ->active_tab_permission_granter(); 2708 ->active_tab_permission_granter();
2702 } 2709 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698