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

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

Issue 48113014: Adjust app windows to play nice with NVHA fast resize CL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing failure on linux_aura 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "ash/shell.h" 45 #include "ash/shell.h"
46 #include "ash/wm/custom_frame_view_ash.h" 46 #include "ash/wm/custom_frame_view_ash.h"
47 #include "ash/wm/panels/panel_frame_view.h" 47 #include "ash/wm/panels/panel_frame_view.h"
48 #include "ash/wm/window_state.h" 48 #include "ash/wm/window_state.h"
49 #include "chrome/browser/ui/ash/ash_util.h" 49 #include "chrome/browser/ui/ash/ash_util.h"
50 #include "ui/aura/client/aura_constants.h" 50 #include "ui/aura/client/aura_constants.h"
51 #include "ui/aura/client/window_tree_client.h" 51 #include "ui/aura/client/window_tree_client.h"
52 #include "ui/aura/window.h" 52 #include "ui/aura/window.h"
53 #endif 53 #endif
54 54
55 #if defined(USE_AURA)
56 #include "ui/aura/window.h"
57 #endif
58
55 using apps::ShellWindow; 59 using apps::ShellWindow;
56 60
57 namespace { 61 namespace {
58 62
59 const int kMinPanelWidth = 100; 63 const int kMinPanelWidth = 100;
60 const int kMinPanelHeight = 100; 64 const int kMinPanelHeight = 100;
61 const int kDefaultPanelWidth = 200; 65 const int kDefaultPanelWidth = 200;
62 const int kDefaultPanelHeight = 300; 66 const int kDefaultPanelHeight = 300;
63 const int kResizeInsideBoundsSize = 5; 67 const int kResizeInsideBoundsSize = 5;
64 const int kResizeAreaCornerSize = 16; 68 const int kResizeAreaCornerSize = 16;
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 } 648 }
645 649
646 void NativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const { 650 void NativeAppWindowViews::GetWidgetHitTestMask(gfx::Path* mask) const {
647 input_region_->getBoundaryPath(mask); 651 input_region_->getBoundaryPath(mask);
648 } 652 }
649 653
650 bool NativeAppWindowViews::ShouldDescendIntoChildForEventHandling( 654 bool NativeAppWindowViews::ShouldDescendIntoChildForEventHandling(
651 gfx::NativeView child, 655 gfx::NativeView child,
652 const gfx::Point& location) { 656 const gfx::Point& location) {
653 #if defined(USE_AURA) 657 #if defined(USE_AURA)
654 if (child == web_view_->web_contents()->GetView()->GetNativeView()) { 658 if (child->Contains(web_view_->web_contents()->GetView()->GetNativeView())) {
655 // Shell window should claim mouse events that fall within the draggable 659 // Shell window should claim mouse events that fall within the draggable
656 // region. 660 // region.
657 return !draggable_region_.get() || 661 return !draggable_region_.get() ||
658 !draggable_region_->contains(location.x(), location.y()); 662 !draggable_region_->contains(location.x(), location.y());
659 } 663 }
660 #endif 664 #endif
661 665
662 return true; 666 return true;
663 } 667 }
664 668
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 return window_bounds.InsetsFrom(client_bounds); 835 return window_bounds.InsetsFrom(client_bounds);
832 } 836 }
833 837
834 bool NativeAppWindowViews::IsVisible() const { 838 bool NativeAppWindowViews::IsVisible() const {
835 return window_->IsVisible(); 839 return window_->IsVisible();
836 } 840 }
837 841
838 void NativeAppWindowViews::HideWithApp() {} 842 void NativeAppWindowViews::HideWithApp() {}
839 void NativeAppWindowViews::ShowWithApp() {} 843 void NativeAppWindowViews::ShowWithApp() {}
840 void NativeAppWindowViews::UpdateWindowMinMaxSize() {} 844 void NativeAppWindowViews::UpdateWindowMinMaxSize() {}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698