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

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

Issue 1255783002: [Mac] Factor out keyboard shortcut handling from ChromeEventProcessingWindow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@execute
Patch Set: Separate CommandDispatcher and CommandDispatcherDelegate. Created 5 years, 4 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 "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 550
551 bool NativeWidgetMac::IsTranslucentWindowOpacitySupported() const { 551 bool NativeWidgetMac::IsTranslucentWindowOpacitySupported() const {
552 return false; 552 return false;
553 } 553 }
554 554
555 void NativeWidgetMac::OnSizeConstraintsChanged() { 555 void NativeWidgetMac::OnSizeConstraintsChanged() {
556 bridge_->OnSizeConstraintsChanged(); 556 bridge_->OnSizeConstraintsChanged();
557 } 557 }
558 558
559 void NativeWidgetMac::RepostNativeEvent(gfx::NativeEvent native_event) { 559 void NativeWidgetMac::RepostNativeEvent(gfx::NativeEvent native_event) {
560 NOTIMPLEMENTED(); 560 id window = [native_event window];
561 if ([window conformsToProtocol:@protocol(CommandDispatcher)])
562 [window redispatchKeyEvent:native_event];
561 } 563 }
562 564
563 //////////////////////////////////////////////////////////////////////////////// 565 ////////////////////////////////////////////////////////////////////////////////
564 // NativeWidgetMac, protected: 566 // NativeWidgetMac, protected:
565 567
566 NSWindow* NativeWidgetMac::CreateNSWindow(const Widget::InitParams& params) { 568 NSWindow* NativeWidgetMac::CreateNSWindow(const Widget::InitParams& params) {
567 return [[[NativeWidgetMacNSWindow alloc] 569 return [[[NativeWidgetMacNSWindow alloc]
568 initWithContentRect:ui::kWindowSizeDeterminedLater 570 initWithContentRect:ui::kWindowSizeDeterminedLater
569 styleMask:StyleMaskForParams(params) 571 styleMask:StyleMaskForParams(params)
570 backing:NSBackingStoreBuffered 572 backing:NSBackingStoreBuffered
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 702 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
701 } 703 }
702 704
703 - (void)animationDidEnd:(NSAnimation*)animation { 705 - (void)animationDidEnd:(NSAnimation*)animation {
704 [window_ close]; 706 [window_ close];
705 [animation_ setDelegate:nil]; 707 [animation_ setDelegate:nil];
706 [self release]; 708 [self release];
707 } 709 }
708 710
709 @end 711 @end
OLDNEW
« ui/views/controls/webview/webview.cc ('K') | « ui/views/controls/webview/webview.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698