OLD | NEW |
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_aura.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame_aura.h" |
6 | 6 |
7 #include "chrome/app/chrome_command_ids.h" | 7 #include "chrome/app/chrome_command_ids.h" |
8 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
9 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" | 9 #include "chrome/browser/ui/views/frame/system_menu_model_delegate.h" |
10 #include "grit/chromium_strings.h" | 10 #include "grit/chromium_strings.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // BrowserFrameAura, public: | 57 // BrowserFrameAura, public: |
58 | 58 |
59 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, | 59 BrowserFrameAura::BrowserFrameAura(BrowserFrame* browser_frame, |
60 BrowserView* browser_view) | 60 BrowserView* browser_view) |
61 : views::NativeWidgetAura(browser_frame), | 61 : views::NativeWidgetAura(browser_frame), |
62 browser_view_(browser_view), | 62 browser_view_(browser_view), |
63 window_property_watcher_(new WindowPropertyWatcher(this, browser_frame)) { | 63 window_property_watcher_(new WindowPropertyWatcher(this, browser_frame)) { |
64 GetNativeWindow()->SetName("BrowserFrameAura"); | 64 GetNativeWindow()->SetName("BrowserFrameAura"); |
65 GetNativeWindow()->AddObserver(window_property_watcher_.get()); | 65 GetNativeWindow()->AddObserver(window_property_watcher_.get()); |
66 #if defined(USE_ASH) | 66 #if defined(USE_ASH) |
67 ash::SetPersistsAcrossAllWorkspaces( | 67 if (browser_view->browser()->type() != Browser::TYPE_POPUP) { |
68 GetNativeWindow(), | 68 ash::SetPersistsAcrossAllWorkspaces( |
69 ash::WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_NO); | 69 GetNativeWindow(), |
| 70 ash::WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_NO); |
| 71 } |
70 #endif | 72 #endif |
71 } | 73 } |
72 | 74 |
73 BrowserFrameAura::~BrowserFrameAura() { | 75 BrowserFrameAura::~BrowserFrameAura() { |
74 } | 76 } |
75 | 77 |
76 /////////////////////////////////////////////////////////////////////////////// | 78 /////////////////////////////////////////////////////////////////////////////// |
77 // BrowserFrameAura, views::ContextMenuController overrides: | 79 // BrowserFrameAura, views::ContextMenuController overrides: |
78 void BrowserFrameAura::ShowContextMenuForView(views::View* source, | 80 void BrowserFrameAura::ShowContextMenuForView(views::View* source, |
79 const gfx::Point& p) { | 81 const gfx::Point& p) { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 153 |
152 //////////////////////////////////////////////////////////////////////////////// | 154 //////////////////////////////////////////////////////////////////////////////// |
153 // NativeBrowserFrame, public: | 155 // NativeBrowserFrame, public: |
154 | 156 |
155 // static | 157 // static |
156 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 158 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
157 BrowserFrame* browser_frame, | 159 BrowserFrame* browser_frame, |
158 BrowserView* browser_view) { | 160 BrowserView* browser_view) { |
159 return new BrowserFrameAura(browser_frame, browser_view); | 161 return new BrowserFrameAura(browser_frame, browser_view); |
160 } | 162 } |
OLD | NEW |