OLD | NEW |
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 return bridge_ && bridge_->window_visible(); | 367 return bridge_ && bridge_->window_visible(); |
368 } | 368 } |
369 | 369 |
370 void NativeWidgetMac::Activate() { | 370 void NativeWidgetMac::Activate() { |
371 if (!bridge_) | 371 if (!bridge_) |
372 return; | 372 return; |
373 | 373 |
374 bridge_->SetVisibilityState(BridgedNativeWidget::SHOW_AND_ACTIVATE_WINDOW); | 374 bridge_->SetVisibilityState(BridgedNativeWidget::SHOW_AND_ACTIVATE_WINDOW); |
375 } | 375 } |
376 | 376 |
| 377 void NativeWidgetMac::ActivateForUserGesture() { |
| 378 Activate(); |
| 379 } |
| 380 |
377 void NativeWidgetMac::Deactivate() { | 381 void NativeWidgetMac::Deactivate() { |
378 NOTIMPLEMENTED(); | 382 NOTIMPLEMENTED(); |
379 } | 383 } |
380 | 384 |
381 bool NativeWidgetMac::IsActive() const { | 385 bool NativeWidgetMac::IsActive() const { |
382 return [GetNativeWindow() isKeyWindow]; | 386 return [GetNativeWindow() isKeyWindow]; |
383 } | 387 } |
384 | 388 |
385 void NativeWidgetMac::SetAlwaysOnTop(bool always_on_top) { | 389 void NativeWidgetMac::SetAlwaysOnTop(bool always_on_top) { |
386 gfx::SetNSWindowAlwaysOnTop(GetNativeWindow(), always_on_top); | 390 gfx::SetNSWindowAlwaysOnTop(GetNativeWindow(), always_on_top); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
638 } | 642 } |
639 | 643 |
640 // static | 644 // static |
641 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { | 645 gfx::FontList NativeWidgetPrivate::GetWindowTitleFontList() { |
642 NOTIMPLEMENTED(); | 646 NOTIMPLEMENTED(); |
643 return gfx::FontList(); | 647 return gfx::FontList(); |
644 } | 648 } |
645 | 649 |
646 } // namespace internal | 650 } // namespace internal |
647 } // namespace views | 651 } // namespace views |
OLD | NEW |