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

Side by Side Diff: chrome/browser/ui/cocoa/apps/native_app_window_cocoa.mm

Issue 375183002: Add app.window.alphaEnabled() and onAlphaEnabledChanged. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 6 years, 5 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 | 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/cocoa/apps/native_app_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/apps/native_app_window_cocoa.h"
6 6
7 #include "apps/app_shim/extension_app_shim_handler_mac.h" 7 #include "apps/app_shim/extension_app_shim_handler_mac.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect)); 793 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect));
794 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect)); 794 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect));
795 795
796 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect]; 796 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect];
797 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); 797 gfx::Rect content_rect(NSRectToCGRect(content_nsrect));
798 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); 798 content_rect.set_y(screen_height - NSMaxY(content_nsrect));
799 799
800 return frame_rect.InsetsFrom(content_rect); 800 return frame_rect.InsetsFrom(content_rect);
801 } 801 }
802 802
803 bool NativeAppWindowCocoa::CanHaveAlphaEnabled() const {
804 return false;
805 }
806
803 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { 807 gfx::NativeView NativeAppWindowCocoa::GetHostView() const {
804 NOTIMPLEMENTED(); 808 NOTIMPLEMENTED();
805 return NULL; 809 return NULL;
806 } 810 }
807 811
808 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { 812 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) {
809 NOTIMPLEMENTED(); 813 NOTIMPLEMENTED();
810 return gfx::Point(); 814 return gfx::Point();
811 } 815 }
812 816
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 } 1008 }
1005 1009
1006 void NativeAppWindowCocoa::UpdateRestoredBounds() { 1010 void NativeAppWindowCocoa::UpdateRestoredBounds() {
1007 if (IsRestored(*this)) 1011 if (IsRestored(*this))
1008 restored_bounds_ = [window() frame]; 1012 restored_bounds_ = [window() frame];
1009 } 1013 }
1010 1014
1011 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { 1015 void NativeAppWindowCocoa::HideWithoutMarkingHidden() {
1012 [window() orderOut:window_controller_]; 1016 [window() orderOut:window_controller_];
1013 } 1017 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698