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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
836 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); | 836 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); |
837 OnViewWasResized(); | 837 OnViewWasResized(); |
838 } | 838 } |
839 | 839 |
840 SkRegion* NativeAppWindowViews::GetDraggableRegion() { | 840 SkRegion* NativeAppWindowViews::GetDraggableRegion() { |
841 return draggable_region_.get(); | 841 return draggable_region_.get(); |
842 } | 842 } |
843 | 843 |
844 void NativeAppWindowViews::UpdateInputRegion(scoped_ptr<SkRegion> region) { | 844 void NativeAppWindowViews::UpdateInputRegion(scoped_ptr<SkRegion> region) { |
845 input_region_ = region.Pass(); | 845 input_region_ = region.Pass(); |
| 846 |
| 847 #if defined(USE_AURA) |
| 848 if (input_region_) |
| 849 window_->SetShape(new SkRegion(*input_region_)); |
| 850 else |
| 851 window_->SetShape(NULL); |
| 852 #endif // defined(USE_AURA) |
846 } | 853 } |
847 | 854 |
848 void NativeAppWindowViews::HandleKeyboardEvent( | 855 void NativeAppWindowViews::HandleKeyboardEvent( |
849 const content::NativeWebKeyboardEvent& event) { | 856 const content::NativeWebKeyboardEvent& event) { |
850 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 857 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
851 GetFocusManager()); | 858 GetFocusManager()); |
852 } | 859 } |
853 | 860 |
854 bool NativeAppWindowViews::IsFrameless() const { | 861 bool NativeAppWindowViews::IsFrameless() const { |
855 return frameless_; | 862 return frameless_; |
(...skipping 11 matching lines...) Expand all Loading... |
867 gfx::Rect client_bounds = gfx::Rect(1000, 1000); | 874 gfx::Rect client_bounds = gfx::Rect(1000, 1000); |
868 gfx::Rect window_bounds = | 875 gfx::Rect window_bounds = |
869 window_->non_client_view()->GetWindowBoundsForClientBounds( | 876 window_->non_client_view()->GetWindowBoundsForClientBounds( |
870 client_bounds); | 877 client_bounds); |
871 return window_bounds.InsetsFrom(client_bounds); | 878 return window_bounds.InsetsFrom(client_bounds); |
872 } | 879 } |
873 | 880 |
874 void NativeAppWindowViews::HideWithApp() {} | 881 void NativeAppWindowViews::HideWithApp() {} |
875 void NativeAppWindowViews::ShowWithApp() {} | 882 void NativeAppWindowViews::ShowWithApp() {} |
876 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} | 883 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} |
OLD | NEW |