Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/browser/ui/views/apps/native_app_window_views.cc

Issue 54983005: Plumb native AppWindow input region through to window shape under Aura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/ui/views/shell_window_frame_view.h" 7 #include "apps/ui/views/shell_window_frame_view.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions)); 800 draggable_region_.reset(ShellWindow::RawDraggableRegionsToSkRegion(regions));
801 OnViewWasResized(); 801 OnViewWasResized();
802 } 802 }
803 803
804 SkRegion* NativeAppWindowViews::GetDraggableRegion() { 804 SkRegion* NativeAppWindowViews::GetDraggableRegion() {
805 return draggable_region_.get(); 805 return draggable_region_.get();
806 } 806 }
807 807
808 void NativeAppWindowViews::UpdateInputRegion(scoped_ptr<SkRegion> region) { 808 void NativeAppWindowViews::UpdateInputRegion(scoped_ptr<SkRegion> region) {
809 input_region_ = region.Pass(); 809 input_region_ = region.Pass();
810
811 #if defined(USE_AURA)
Ben Goodger (Google) 2013/11/01 16:39:47 is there a reason this has to be USE_AURA? It shou
Wez 2013/11/01 19:59:33 UpdateInputRegion() takes scoped_ptr<SkRegion>, wh
812 if (input_region_)
813 window_->SetShape(new SkRegion(*input_region_));
814 else
815 window_->SetShape(NULL);
816 #endif // defined(USE_AURA)
810 } 817 }
811 818
812 void NativeAppWindowViews::HandleKeyboardEvent( 819 void NativeAppWindowViews::HandleKeyboardEvent(
813 const content::NativeWebKeyboardEvent& event) { 820 const content::NativeWebKeyboardEvent& event) {
814 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, 821 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event,
815 GetFocusManager()); 822 GetFocusManager());
816 } 823 }
817 824
818 bool NativeAppWindowViews::IsFrameless() const { 825 bool NativeAppWindowViews::IsFrameless() const {
819 return frameless_; 826 return frameless_;
(...skipping 15 matching lines...) Expand all
835 return window_bounds.InsetsFrom(client_bounds); 842 return window_bounds.InsetsFrom(client_bounds);
836 } 843 }
837 844
838 bool NativeAppWindowViews::IsVisible() const { 845 bool NativeAppWindowViews::IsVisible() const {
839 return window_->IsVisible(); 846 return window_->IsVisible();
840 } 847 }
841 848
842 void NativeAppWindowViews::HideWithApp() {} 849 void NativeAppWindowViews::HideWithApp() {}
843 void NativeAppWindowViews::ShowWithApp() {} 850 void NativeAppWindowViews::ShowWithApp() {}
844 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} 851 void NativeAppWindowViews::UpdateWindowMinMaxSize() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698