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_frame.cc

Issue 10855225: Restore panel behavior on Ash/ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/chromeos/chromeos_version.h" 7 #include "base/chromeos/chromeos_version.h"
8 #include "base/i18n/rtl.h" 8 #include "base/i18n/rtl.h"
9 #include "chrome/browser/themes/theme_service.h" 9 #include "chrome/browser/themes/theme_service.h"
10 #include "chrome/browser/themes/theme_service_factory.h" 10 #include "chrome/browser/themes/theme_service_factory.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // We need to set the top-most bit when the panel window is created. 58 // 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 59 // 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 60 // from being changed to top-most after the window is created without
61 // activation. 61 // activation.
62 params.type = views::Widget::InitParams::TYPE_PANEL; 62 params.type = views::Widget::InitParams::TYPE_PANEL;
63 } 63 }
64 #if defined(USE_AURA) 64 #if defined(USE_AURA)
65 // Aura frames are translucent. 65 // Aura frames are translucent.
66 params.transparent = true; 66 params.transparent = true;
67 #endif 67 #endif
68 #if defined(USE_ASH)
69 // Note: browser_view_->IsPanel() always returns false on Ash because the
70 // BrowserView is not a panel. For Browser child panels and popups, we want
71 // to set them to be always on top.
72 if (browser_view_->browser()->is_type_panel() &&
73 browser_view_->browser()->app_type() == Browser::APP_TYPE_CHILD) {
74 params.keep_on_top = true;
75 }
76 #endif
77 Init(params); 68 Init(params);
78 69
79 native_browser_frame_->InitSystemContextMenu(); 70 native_browser_frame_->InitSystemContextMenu();
80 } 71 }
81 72
82 int BrowserFrame::GetMinimizeButtonOffset() const { 73 int BrowserFrame::GetMinimizeButtonOffset() const {
83 return native_browser_frame_->GetMinimizeButtonOffset(); 74 return native_browser_frame_->GetMinimizeButtonOffset();
84 } 75 }
85 76
86 gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const { 77 gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // set ourselves as the last active browser window to ensure that we get 145 // set ourselves as the last active browser window to ensure that we get
155 // treated as such by the rest of Chrome. 146 // treated as such by the rest of Chrome.
156 BrowserList::SetLastActive(browser_view_->browser()); 147 BrowserList::SetLastActive(browser_view_->browser());
157 } 148 }
158 Widget::OnNativeWidgetActivationChanged(active); 149 Widget::OnNativeWidgetActivationChanged(active);
159 } 150 }
160 151
161 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 152 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
162 return browser_frame_view_->avatar_button(); 153 return browser_frame_view_->avatar_button();
163 } 154 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/window_open_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698