| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 223 |
| 224 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { | 224 void BrowserFrame::OnNativeWidgetWorkspaceChanged() { |
| 225 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); | 225 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); |
| 226 #if !defined(OS_CHROMEOS) && defined(USE_X11) | 226 #if !defined(OS_CHROMEOS) && defined(USE_X11) |
| 227 BrowserList::MoveBrowsersInWorkspaceToFront( | 227 BrowserList::MoveBrowsersInWorkspaceToFront( |
| 228 views::X11DesktopHandler::get()->GetWorkspace()); | 228 views::X11DesktopHandler::get()->GetWorkspace()); |
| 229 #endif | 229 #endif |
| 230 Widget::OnNativeWidgetWorkspaceChanged(); | 230 Widget::OnNativeWidgetWorkspaceChanged(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) { |
| 234 views::Widget::OnNativeThemeUpdated(observed_theme); |
| 235 browser_view_->NativeThemeUpdated(observed_theme); |
| 236 } |
| 237 |
| 233 void BrowserFrame::ShowContextMenuForView(views::View* source, | 238 void BrowserFrame::ShowContextMenuForView(views::View* source, |
| 234 const gfx::Point& p, | 239 const gfx::Point& p, |
| 235 ui::MenuSourceType source_type) { | 240 ui::MenuSourceType source_type) { |
| 236 if (chrome::IsRunningInForcedAppMode()) | 241 if (chrome::IsRunningInForcedAppMode()) |
| 237 return; | 242 return; |
| 238 | 243 |
| 239 // Only show context menu if point is in unobscured parts of browser, i.e. | 244 // Only show context menu if point is in unobscured parts of browser, i.e. |
| 240 // if NonClientHitTest returns : | 245 // if NonClientHitTest returns : |
| 241 // - HTCAPTION: in title bar or unobscured part of tabstrip | 246 // - HTCAPTION: in title bar or unobscured part of tabstrip |
| 242 // - HTNOWHERE: as the name implies. | 247 // - HTNOWHERE: as the name implies. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return menu_model_builder_->menu_model(); | 280 return menu_model_builder_->menu_model(); |
| 276 } | 281 } |
| 277 | 282 |
| 278 views::View* BrowserFrame::GetNewAvatarMenuButton() { | 283 views::View* BrowserFrame::GetNewAvatarMenuButton() { |
| 279 return browser_frame_view_->GetProfileSwitcherView(); | 284 return browser_frame_view_->GetProfileSwitcherView(); |
| 280 } | 285 } |
| 281 | 286 |
| 282 void BrowserFrame::OnMenuClosed() { | 287 void BrowserFrame::OnMenuClosed() { |
| 283 menu_runner_.reset(); | 288 menu_runner_.reset(); |
| 284 } | 289 } |
| OLD | NEW |