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

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: Pipe CanHaveAlphaEnabled through Widget. 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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect)); 792 gfx::Rect frame_rect(NSRectToCGRect(frame_nsrect));
793 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect)); 793 frame_rect.set_y(screen_height - NSMaxY(frame_nsrect));
794 794
795 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect]; 795 NSRect content_nsrect = [window() contentRectForFrameRect:frame_nsrect];
796 gfx::Rect content_rect(NSRectToCGRect(content_nsrect)); 796 gfx::Rect content_rect(NSRectToCGRect(content_nsrect));
797 content_rect.set_y(screen_height - NSMaxY(content_nsrect)); 797 content_rect.set_y(screen_height - NSMaxY(content_nsrect));
798 798
799 return frame_rect.InsetsFrom(content_rect); 799 return frame_rect.InsetsFrom(content_rect);
800 } 800 }
801 801
802 bool NativeAppWindowCocoa::CanHaveAlphaEnabled() const {
803 return false;
804 }
805
802 gfx::NativeView NativeAppWindowCocoa::GetHostView() const { 806 gfx::NativeView NativeAppWindowCocoa::GetHostView() const {
803 NOTIMPLEMENTED(); 807 NOTIMPLEMENTED();
804 return NULL; 808 return NULL;
805 } 809 }
806 810
807 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) { 811 gfx::Point NativeAppWindowCocoa::GetDialogPosition(const gfx::Size& size) {
808 NOTIMPLEMENTED(); 812 NOTIMPLEMENTED();
809 return gfx::Point(); 813 return gfx::Point();
810 } 814 }
811 815
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 } 1005 }
1002 1006
1003 void NativeAppWindowCocoa::UpdateRestoredBounds() { 1007 void NativeAppWindowCocoa::UpdateRestoredBounds() {
1004 if (IsRestored(*this)) 1008 if (IsRestored(*this))
1005 restored_bounds_ = [window() frame]; 1009 restored_bounds_ = [window() frame];
1006 } 1010 }
1007 1011
1008 void NativeAppWindowCocoa::HideWithoutMarkingHidden() { 1012 void NativeAppWindowCocoa::HideWithoutMarkingHidden() {
1009 [window() orderOut:window_controller_]; 1013 [window() orderOut:window_controller_];
1010 } 1014 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698