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

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

Issue 11364053: make StackingClient dispatch to either ash or desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + disable prerender tests on win-aura Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_frame.h" 5 #include "chrome/browser/ui/views/frame/browser_frame.h"
6 6
7 #include "ash/shell.h"
7 #include "base/chromeos/chromeos_version.h" 8 #include "base/chromeos/chromeos_version.h"
8 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
9 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 11 #include "chrome/browser/themes/theme_service_factory.h"
11 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_list.h" 13 #include "chrome/browser/ui/browser_list.h"
13 #include "chrome/browser/ui/browser_window_state.h" 14 #include "chrome/browser/ui/browser_window_state.h"
14 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 15 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
15 #include "chrome/browser/ui/views/frame/browser_root_view.h" 16 #include "chrome/browser/ui/views/frame/browser_root_view.h"
16 #include "chrome/browser/ui/views/frame/browser_view.h" 17 #include "chrome/browser/ui/views/frame/browser_view.h"
17 #include "chrome/browser/ui/views/frame/native_browser_frame.h" 18 #include "chrome/browser/ui/views/frame/native_browser_frame.h"
18 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "ui/aura/root_window.h"
21 #include "ui/aura/window.h"
19 #include "ui/base/theme_provider.h" 22 #include "ui/base/theme_provider.h"
20 #include "ui/gfx/screen.h" 23 #include "ui/gfx/screen.h"
21 #include "ui/views/widget/native_widget.h" 24 #include "ui/views/widget/native_widget.h"
22 25
23 #if defined(OS_WIN) && !defined(USE_AURA) 26 #if defined(OS_WIN) && !defined(USE_AURA)
24 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" 27 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
25 #endif 28 #endif
26 29
27 //////////////////////////////////////////////////////////////////////////////// 30 ////////////////////////////////////////////////////////////////////////////////
28 // BrowserFrame, public: 31 // BrowserFrame, public:
(...skipping 25 matching lines...) Expand all
54 &params.bounds, 57 &params.bounds,
55 &params.show_state); 58 &params.show_state);
56 } 59 }
57 if (browser_view_->IsPanel()) { 60 if (browser_view_->IsPanel()) {
58 // We need to set the top-most bit when the panel window is created. 61 // We need to set the top-most bit when the panel window is created.
59 // There is a Windows bug/feature that would very likely prevent the window 62 // There is a Windows bug/feature that would very likely prevent the window
60 // from being changed to top-most after the window is created without 63 // from being changed to top-most after the window is created without
61 // activation. 64 // activation.
62 params.type = views::Widget::InitParams::TYPE_PANEL; 65 params.type = views::Widget::InitParams::TYPE_PANEL;
63 } 66 }
67 #if defined(USE_ASH)
68 if (browser_view_->browser()->host_desktop_type() ==
69 chrome::HOST_DESKTOP_TYPE_ASH) {
70 params.context = ash::Shell::GetAllRootWindows()[0];
71 }
72 #endif
64 Init(params); 73 Init(params);
65 74
66 native_browser_frame_->InitSystemContextMenu(); 75 native_browser_frame_->InitSystemContextMenu();
67 } 76 }
68 77
69 int BrowserFrame::GetMinimizeButtonOffset() const { 78 int BrowserFrame::GetMinimizeButtonOffset() const {
70 return native_browser_frame_->GetMinimizeButtonOffset(); 79 return native_browser_frame_->GetMinimizeButtonOffset();
71 } 80 }
72 81
73 gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const { 82 gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 148
140 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 149 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
141 return browser_frame_view_->avatar_button(); 150 return browser_frame_view_->avatar_button();
142 } 151 }
143 152
144 #if !defined(OS_WIN) || defined(USE_AURA) 153 #if !defined(OS_WIN) || defined(USE_AURA)
145 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() { 154 bool BrowserFrame::ShouldLeaveOffsetNearTopBorder() {
146 return !IsMaximized(); 155 return !IsMaximized();
147 } 156 }
148 #endif // OS_WIN 157 #endif // OS_WIN
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698