OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 5 #ifndef VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 6 #define VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 #include <string> | 10 #include <string> |
(...skipping 20 matching lines...) Expand all Loading... |
31 virtual void NativeViewAttached(); | 31 virtual void NativeViewAttached(); |
32 virtual void NativeViewDetaching(bool destroyed); | 32 virtual void NativeViewDetaching(bool destroyed); |
33 virtual void AddedToWidget(); | 33 virtual void AddedToWidget(); |
34 virtual void RemovedFromWidget(); | 34 virtual void RemovedFromWidget(); |
35 virtual void InstallClip(int x, int y, int w, int h); | 35 virtual void InstallClip(int x, int y, int w, int h); |
36 virtual bool HasInstalledClip(); | 36 virtual bool HasInstalledClip(); |
37 virtual void UninstallClip(); | 37 virtual void UninstallClip(); |
38 virtual void ShowWidget(int x, int y, int w, int h); | 38 virtual void ShowWidget(int x, int y, int w, int h); |
39 virtual void HideWidget(); | 39 virtual void HideWidget(); |
40 virtual void SetFocus(); | 40 virtual void SetFocus(); |
| 41 virtual gfx::NativeViewAccessible GetNativeViewAccessible(); |
41 | 42 |
42 private: | 43 private: |
43 // Create and Destroy the GtkFixed that performs clipping on our hosted | 44 // Create and Destroy the GtkFixed that performs clipping on our hosted |
44 // GtkWidget. |needs_window| is true when a clip is installed and implies the | 45 // GtkWidget. |needs_window| is true when a clip is installed and implies the |
45 // fixed is backed by a X Window which actually performs the clipping. | 46 // fixed is backed by a X Window which actually performs the clipping. |
46 // It's kind of retarded that Gtk/Cairo doesn't clip painting of child windows | 47 // It's kind of retarded that Gtk/Cairo doesn't clip painting of child windows |
47 // regardless of whether or not there's an X Window. It's not that hard. | 48 // regardless of whether or not there's an X Window. It's not that hard. |
48 void CreateFixed(bool needs_window); | 49 void CreateFixed(bool needs_window); |
49 | 50 |
50 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. | 51 // Destroys the GtkFixed that performs clipping on our hosted GtkWidget. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // The GtkFixed that contains the attached gfx::NativeView (used for | 85 // The GtkFixed that contains the attached gfx::NativeView (used for |
85 // clipping). | 86 // clipping). |
86 GtkWidget* fixed_; | 87 GtkWidget* fixed_; |
87 | 88 |
88 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); | 89 DISALLOW_COPY_AND_ASSIGN(NativeViewHostGtk); |
89 }; | 90 }; |
90 | 91 |
91 } // namespace views | 92 } // namespace views |
92 | 93 |
93 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ | 94 #endif // VIEWS_CONTROLS_NATIVE_NATIVE_VIEW_HOST_GTK_H_ |
OLD | NEW |