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

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: Created 9 years 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 | « no previous file | ui/aura/client/aura_constants.h » ('j') | ui/aura_shell/shell_window_ids.h » ('J')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.keep_on_top = true;
66 params.is_panel = true;
66 } 67 }
67 #if defined(USE_AURA) 68 #if defined(USE_AURA)
68 CommandLine* command_line = CommandLine::ForCurrentProcess(); 69 CommandLine* command_line = CommandLine::ForCurrentProcess();
69 if (command_line->HasSwitch(switches::kAuraTranslucentFrames)) 70 if (command_line->HasSwitch(switches::kAuraTranslucentFrames))
70 params.transparent = true; 71 params.transparent = true;
71 // Aura laptop mode fills the monitor with with its windows. 72 // Aura laptop mode fills the monitor with with its windows.
72 if (switches::IsAuraWindowModeCompact() && 73 if (switches::IsAuraWindowModeCompact() &&
73 browser_view_->IsBrowserTypeNormal()) { 74 browser_view_->IsBrowserTypeNormal()) {
74 params.bounds = gfx::Screen::GetPrimaryMonitorBounds(); 75 params.bounds = gfx::Screen::GetPrimaryMonitorBounds();
75 params.show_state = ui::SHOW_STATE_MAXIMIZED; 76 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 181 // set ourselves as the last active browser window to ensure that we get
181 // treated as such by the rest of Chrome. 182 // treated as such by the rest of Chrome.
182 BrowserList::SetLastActive(browser_view_->browser()); 183 BrowserList::SetLastActive(browser_view_->browser());
183 } 184 }
184 Widget::OnNativeWidgetActivationChanged(active); 185 Widget::OnNativeWidgetActivationChanged(active);
185 } 186 }
186 187
187 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() { 188 AvatarMenuButton* BrowserFrame::GetAvatarMenuButton() {
188 return browser_frame_view_->avatar_button(); 189 return browser_frame_view_->avatar_button();
189 } 190 }
OLDNEW
« no previous file with comments | « no previous file | ui/aura/client/aura_constants.h » ('j') | ui/aura_shell/shell_window_ids.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698