| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/apps/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/native_app_window_views.h" | 
| 6 | 6 | 
| 7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" | 
| 8 #include "apps/ui/views/shell_window_frame_view.h" | 8 #include "apps/ui/views/shell_window_frame_view.h" | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" | 
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 573 } | 573 } | 
| 574 | 574 | 
| 575 void NativeAppWindowViews::SetAlwaysOnTop(bool always_on_top) { | 575 void NativeAppWindowViews::SetAlwaysOnTop(bool always_on_top) { | 
| 576   window_->SetAlwaysOnTop(always_on_top); | 576   window_->SetAlwaysOnTop(always_on_top); | 
| 577 } | 577 } | 
| 578 | 578 | 
| 579 void NativeAppWindowViews::ShowContextMenuForView( | 579 void NativeAppWindowViews::ShowContextMenuForView( | 
| 580     views::View* source, | 580     views::View* source, | 
| 581     const gfx::Point& p, | 581     const gfx::Point& p, | 
| 582     ui::MenuSourceType source_type) { | 582     ui::MenuSourceType source_type) { | 
| 583 #if defined(USE_ASH) | 583 #if defined(USE_ASH) & defined(OS_CHROMEOS) | 
| 584   scoped_ptr<ui::MenuModel> model = CreateMultiUserContextMenu( | 584   scoped_ptr<ui::MenuModel> model = CreateMultiUserContextMenu( | 
| 585       shell_window_->GetNativeWindow()); | 585       shell_window_->GetNativeWindow()); | 
| 586   if (!model.get()) | 586   if (!model.get()) | 
| 587     return; | 587     return; | 
| 588 | 588 | 
| 589   // Only show context menu if point is in caption. | 589   // Only show context menu if point is in caption. | 
| 590   gfx::Point point_in_view_coords(p); | 590   gfx::Point point_in_view_coords(p); | 
| 591   views::View::ConvertPointFromScreen(window_->non_client_view(), | 591   views::View::ConvertPointFromScreen(window_->non_client_view(), | 
| 592                                       &point_in_view_coords); | 592                                       &point_in_view_coords); | 
| 593   int hit_test = window_->non_client_view()->NonClientHitTest( | 593   int hit_test = window_->non_client_view()->NonClientHitTest( | 
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 973   gfx::Rect client_bounds = gfx::Rect(1000, 1000); | 973   gfx::Rect client_bounds = gfx::Rect(1000, 1000); | 
| 974   gfx::Rect window_bounds = | 974   gfx::Rect window_bounds = | 
| 975       window_->non_client_view()->GetWindowBoundsForClientBounds( | 975       window_->non_client_view()->GetWindowBoundsForClientBounds( | 
| 976           client_bounds); | 976           client_bounds); | 
| 977   return window_bounds.InsetsFrom(client_bounds); | 977   return window_bounds.InsetsFrom(client_bounds); | 
| 978 } | 978 } | 
| 979 | 979 | 
| 980 void NativeAppWindowViews::HideWithApp() {} | 980 void NativeAppWindowViews::HideWithApp() {} | 
| 981 void NativeAppWindowViews::ShowWithApp() {} | 981 void NativeAppWindowViews::ShowWithApp() {} | 
| 982 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} | 982 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} | 
| OLD | NEW | 
|---|