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

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

Issue 552313003: Make CanResize and CanMaximize depend on shape (WidgetHasHitTestMask). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 years, 3 months 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
« no previous file with comments | « apps/ui/views/native_app_window_views.cc ('k') | 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chrome_native_app_window_views.h" 5 #include "chrome/browser/ui/views/apps/chrome_native_app_window_views.h"
6 6
7 #include "apps/ui/views/app_window_frame_view.h" 7 #include "apps/ui/views/app_window_frame_view.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/app_mode/app_mode_utils.h" 10 #include "chrome/browser/app_mode/app_mode_utils.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 widget()->SetShape(new SkRegion(*shape_)); 635 widget()->SetShape(new SkRegion(*shape_));
636 if (!had_shape) { 636 if (!had_shape) {
637 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>( 637 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
638 new ShapedAppWindowTargeter(native_window, this))); 638 new ShapedAppWindowTargeter(native_window, this)));
639 } 639 }
640 } else { 640 } else {
641 widget()->SetShape(NULL); 641 widget()->SetShape(NULL);
642 if (had_shape) 642 if (had_shape)
643 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>()); 643 native_window->SetEventTargeter(scoped_ptr<ui::EventTargeter>());
644 } 644 }
645 widget()->OnSizeConstraintsChanged();
645 } 646 }
646 647
647 bool ChromeNativeAppWindowViews::HasFrameColor() const { 648 bool ChromeNativeAppWindowViews::HasFrameColor() const {
648 return has_frame_color_; 649 return has_frame_color_;
649 } 650 }
650 651
651 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const { 652 SkColor ChromeNativeAppWindowViews::ActiveFrameColor() const {
652 return active_frame_color_; 653 return active_frame_color_;
653 } 654 }
654 655
(...skipping 15 matching lines...) Expand all
670 InitializePanelWindow(create_params); 671 InitializePanelWindow(create_params);
671 } else { 672 } else {
672 InitializeDefaultWindow(create_params); 673 InitializeDefaultWindow(create_params);
673 } 674 }
674 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews( 675 extension_keybinding_registry_.reset(new ExtensionKeybindingRegistryViews(
675 Profile::FromBrowserContext(app_window->browser_context()), 676 Profile::FromBrowserContext(app_window->browser_context()),
676 widget()->GetFocusManager(), 677 widget()->GetFocusManager(),
677 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY, 678 extensions::ExtensionKeybindingRegistry::PLATFORM_APPS_ONLY,
678 NULL)); 679 NULL));
679 } 680 }
OLDNEW
« no previous file with comments | « apps/ui/views/native_app_window_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698