| 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.h" | 5 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/leak_annotations.h" | 10 #include "base/debug/leak_annotations.h" |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 void BrowserFrame::OnNativeWidgetActivationChanged(bool active) { | 213 void BrowserFrame::OnNativeWidgetActivationChanged(bool active) { |
| 214 if (active) { | 214 if (active) { |
| 215 // When running under remote desktop, if the remote desktop client is not | 215 // When running under remote desktop, if the remote desktop client is not |
| 216 // active on the users desktop, then none of the windows contained in the | 216 // active on the users desktop, then none of the windows contained in the |
| 217 // remote desktop will be activated. However, NativeWidget::Activate() will | 217 // remote desktop will be activated. However, NativeWidget::Activate() will |
| 218 // still bring this browser window to the foreground. We explicitly set | 218 // still bring this browser window to the foreground. We explicitly set |
| 219 // ourselves as the last active browser window to ensure that we get treated | 219 // ourselves as the last active browser window to ensure that we get treated |
| 220 // as such by the rest of Chrome. | 220 // as such by the rest of Chrome. |
| 221 BrowserList::SetLastActive(browser_view_->browser()); | 221 BrowserList::SetLastActive(browser_view_->browser()); |
| 222 } else { |
| 223 BrowserList::NotifyBrowserNoLongerActive(browser_view_->browser()); |
| 222 } | 224 } |
| 223 Widget::OnNativeWidgetActivationChanged(active); | 225 Widget::OnNativeWidgetActivationChanged(active); |
| 224 } | 226 } |
| 225 | 227 |
| 226 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { | 228 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { |
| 227 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); | 229 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); |
| 228 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 230 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 229 BrowserList::MoveBrowsersInWorkspaceToFront( | 231 BrowserList::MoveBrowsersInWorkspaceToFront( |
| 230 views::X11DesktopHandler::get()->GetWorkspace()); | 232 views::X11DesktopHandler::get()->GetWorkspace()); |
| 231 #endif | 233 #endif |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 menu_model_builder_.reset( | 278 menu_model_builder_.reset( |
| 277 new SystemMenuModelBuilder(browser_view_, browser_view_->browser())); | 279 new SystemMenuModelBuilder(browser_view_, browser_view_->browser())); |
| 278 menu_model_builder_->Init(); | 280 menu_model_builder_->Init(); |
| 279 } | 281 } |
| 280 return menu_model_builder_->menu_model(); | 282 return menu_model_builder_->menu_model(); |
| 281 } | 283 } |
| 282 | 284 |
| 283 views::View* BrowserFrame::GetNewAvatarMenuButton() { | 285 views::View* BrowserFrame::GetNewAvatarMenuButton() { |
| 284 return browser_frame_view_->GetProfileSwitcherView(); | 286 return browser_frame_view_->GetProfileSwitcherView(); |
| 285 } | 287 } |
| OLD | NEW |