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

Side by Side Diff: views/controls/native_control_gtk.h

Issue 114059: Refactors HWNDView, NativeViewHostGtk and NativeViewHost so that they match t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « views/controls/native_control.cc ('k') | views/controls/native_control_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_ 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_
7 7
8 #include "views/controls/native_view_host_gtk.h" 8 #include "views/controls/native/native_view_host.h"
9 9
10 namespace views { 10 namespace views {
11 11
12 // A View that hosts a native control. 12 // A View that hosts a native control.
13 class NativeControlGtk : public NativeViewHostGtk { 13 class NativeControlGtk : public NativeViewHost {
14 public: 14 public:
15 NativeControlGtk(); 15 NativeControlGtk();
16 virtual ~NativeControlGtk(); 16 virtual ~NativeControlGtk();
17 17
18 // Overridden from View: 18 // Overridden from View:
19 virtual void SetEnabled(bool enabled); 19 virtual void SetEnabled(bool enabled);
20 20
21 protected: 21 protected:
22 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); 22 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
23 virtual void VisibilityChanged(View* starting_from, bool is_visible); 23 virtual void VisibilityChanged(View* starting_from, bool is_visible);
24 virtual void Focus(); 24 virtual void Focus();
25 25
26 // Called when the NativeControlGtk is attached to a View hierarchy with a 26 // Called when the NativeControlGtk is attached to a View hierarchy with a
27 // valid Widget. The NativeControlGtk should use this opportunity to create 27 // valid Widget. The NativeControlGtk should use this opportunity to create
28 // its associated GtkWidget. 28 // its associated GtkWidget.
29 virtual void CreateNativeControl() = 0; 29 virtual void CreateNativeControl() = 0;
30 30
31 // MUST be called by the subclass implementation of |CreateNativeControl| 31 // MUST be called by the subclass implementation of |CreateNativeControl|
32 // immediately after creating the control GtkWidget, otherwise it won't be 32 // immediately after creating the control GtkWidget, otherwise it won't be
33 // attached to the GtkView and will be effectively orphaned. 33 // attached to the GtkView and will be effectively orphaned.
34 virtual void NativeControlCreated(GtkWidget* widget); 34 virtual void NativeControlCreated(GtkWidget* widget);
35 35
36 private: 36 private:
37 DISALLOW_COPY_AND_ASSIGN(NativeControlGtk); 37 DISALLOW_COPY_AND_ASSIGN(NativeControlGtk);
38 }; 38 };
39 39
40 } // namespace views 40 } // namespace views
41 41
42 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_ 42 #endif // #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_GTK_H_
OLDNEW
« no previous file with comments | « views/controls/native_control.cc ('k') | views/controls/native_control_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698