Add ICU message format support
[chromium-blink-merge.git] / ui / views / controls / native / native_view_host_mac.h
blobb47d1c2d441ae15ce20147f7ea1e758cf69cba84
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
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_MAC_H_
6 #define UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_MAC_H_
8 #include "base/mac/scoped_nsobject.h"
9 #include "base/macros.h"
10 #include "ui/views/controls/native/native_view_host_wrapper.h"
11 #include "ui/views/views_export.h"
13 namespace views {
15 class NativeViewHost;
17 // Mac implementation of NativeViewHostWrapper.
18 class VIEWS_EXPORT NativeViewHostMac : public NativeViewHostWrapper {
19 public:
20 explicit NativeViewHostMac(NativeViewHost* host);
21 ~NativeViewHostMac() override;
23 // Overridden from NativeViewHostWrapper:
24 void AttachNativeView() override;
25 void NativeViewDetaching(bool destroyed) override;
26 void AddedToWidget() override;
27 void RemovedFromWidget() override;
28 void InstallClip(int x, int y, int w, int h) override;
29 bool HasInstalledClip() override;
30 void UninstallClip() override;
31 void ShowWidget(int x, int y, int w, int h) override;
32 void HideWidget() override;
33 void SetFocus() override;
34 gfx::NativeViewAccessible GetNativeViewAccessible() override;
35 gfx::NativeCursor GetCursor(int x, int y) override;
37 private:
38 // Our associated NativeViewHost. Owns this.
39 NativeViewHost* host_;
41 // Retain the native view as it may be destroyed at an unpredictable time.
42 base::scoped_nsobject<NSView> native_view_;
44 DISALLOW_COPY_AND_ASSIGN(NativeViewHostMac);
47 } // namespace views
49 #endif // UI_VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_AURA_H_