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

Side by Side Diff: ui/views/widget/native_widget_mac.mm

Issue 2778733004: Add WindowPinType property on arua::Window (Closed)
Patch Set: WIP Created 3 years, 8 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
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 "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if (!bridge_ || fullscreen == IsFullscreen()) 503 if (!bridge_ || fullscreen == IsFullscreen())
504 return; 504 return;
505 505
506 bridge_->ToggleDesiredFullscreenState(); 506 bridge_->ToggleDesiredFullscreenState();
507 } 507 }
508 508
509 bool NativeWidgetMac::IsFullscreen() const { 509 bool NativeWidgetMac::IsFullscreen() const {
510 return bridge_ && bridge_->target_fullscreen_state(); 510 return bridge_ && bridge_->target_fullscreen_state();
511 } 511 }
512 512
513 void NativeWidgetMac::Pin(bool trusted) {
514 // We only use Pin() for ARC++ window on Chromebook, so we don't need
515 // implement it for Mac.
516 NOTIMPLEMENTED();
517 }
518
519 bool NativeWidgetMac::IsPinned() const {
520 return false;
521 }
522
513 void NativeWidgetMac::SetOpacity(float opacity) { 523 void NativeWidgetMac::SetOpacity(float opacity) {
514 [GetNativeWindow() setAlphaValue:opacity]; 524 [GetNativeWindow() setAlphaValue:opacity];
515 } 525 }
516 526
517 void NativeWidgetMac::FlashFrame(bool flash_frame) { 527 void NativeWidgetMac::FlashFrame(bool flash_frame) {
518 NOTIMPLEMENTED(); 528 NOTIMPLEMENTED();
519 } 529 }
520 530
521 void NativeWidgetMac::RunShellDrag(View* view, 531 void NativeWidgetMac::RunShellDrag(View* view,
522 const ui::OSExchangeData& data, 532 const ui::OSExchangeData& data,
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 800 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
791 } 801 }
792 802
793 - (void)animationDidEnd:(NSAnimation*)animation { 803 - (void)animationDidEnd:(NSAnimation*)animation {
794 [window_ close]; 804 [window_ close];
795 [animation_ setDelegate:nil]; 805 [animation_ setDelegate:nil];
796 [self release]; 806 [self release];
797 } 807 }
798 808
799 @end 809 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698