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

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

Issue 9027020: Bypass ToplevelWindowEventFilter for panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge/sync Created 8 years, 12 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 | « ash/wm/stacking_controller.cc ('k') | ui/aura/client/window_types.h » ('j') | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/themes/theme_service.h"
9 #include "chrome/browser/themes/theme_service_factory.h" 9 #include "chrome/browser/themes/theme_service_factory.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // Typed panel/popup can only return a size once the widget has been 55 // Typed panel/popup can only return a size once the widget has been
56 // created. 56 // created.
57 params.bounds = browser_view_->browser()->GetSavedWindowBounds(); 57 params.bounds = browser_view_->browser()->GetSavedWindowBounds();
58 params.show_state = browser_view_->browser()->GetSavedWindowShowState(); 58 params.show_state = browser_view_->browser()->GetSavedWindowShowState();
59 } 59 }
60 if (browser_view_->browser()->is_type_panel()) { 60 if (browser_view_->browser()->is_type_panel()) {
61 // 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.
62 // 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
63 // 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
64 // activation. 64 // activation.
65 params.keep_on_top = true; 65 params.type = views::Widget::InitParams::TYPE_PANEL;
66 } 66 }
67 #if defined(USE_AURA) 67 #if defined(USE_AURA)
68 CommandLine* command_line = CommandLine::ForCurrentProcess(); 68 CommandLine* command_line = CommandLine::ForCurrentProcess();
69 if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames)) 69 if (command_line->HasSwitch(ash::switches::kAuraTranslucentFrames))
70 params.transparent = true; 70 params.transparent = true;
71 // Aura laptop mode fills the monitor with with its windows. 71 // Aura laptop mode fills the monitor with with its windows.
72 if (ash::switches::IsAuraWindowModeCompact() && 72 if (ash::switches::IsAuraWindowModeCompact() &&
73 browser_view_->IsBrowserTypeNormal()) { 73 browser_view_->IsBrowserTypeNormal()) {
74 params.bounds = gfx::Screen::GetPrimaryMonitorBounds(); 74 params.bounds = gfx::Screen::GetPrimaryMonitorBounds();
75 params.show_state = ui::SHOW_STATE_MAXIMIZED; 75 params.show_state = ui::SHOW_STATE_MAXIMIZED;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // set ourselves as the last active browser window to ensure that we get 180 // set ourselves as the last active browser window to ensure that we get
181 // treated as such by the rest of Chrome. 181 // treated as such by the rest of Chrome.
182 BrowserList::SetLastActive(browser_view_->browser()); 182 BrowserList::SetLastActive(browser_view_->browser());
183 } 183 }
184 Widget::OnNativeWidgetActivationChanged(active); 184 Widget::OnNativeWidgetActivationChanged(active);
185 } 185 }
186 186
187 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 187 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
188 return browser_frame_view_->avatar_button(); 188 return browser_frame_view_->avatar_button();
189 } 189 }
OLDNEW
« no previous file with comments | « ash/wm/stacking_controller.cc ('k') | ui/aura/client/window_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698