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

Side by Side Diff: views/controls/native/native_view_host.h

Issue 194041: Making the focus remembering across tab switch work. (Closed)
Patch Set: Fix for conflicts Created 11 years, 3 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_VIEW_HOST_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_VIEW_HOST_H_
6 #define VIEWS_CONTROLS_NATIVE_VIEW_HOST_H_ 6 #define VIEWS_CONTROLS_NATIVE_VIEW_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "views/view.h" 10 #include "views/view.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Accessor for |native_view_|. 64 // Accessor for |native_view_|.
65 gfx::NativeView native_view() const { return native_view_; } 65 gfx::NativeView native_view() const { return native_view_; }
66 66
67 void NativeViewDestroyed(); 67 void NativeViewDestroyed();
68 68
69 // Overridden from View: 69 // Overridden from View:
70 virtual gfx::Size GetPreferredSize(); 70 virtual gfx::Size GetPreferredSize();
71 virtual void Layout(); 71 virtual void Layout();
72 virtual void Paint(gfx::Canvas* canvas); 72 virtual void Paint(gfx::Canvas* canvas);
73 virtual void VisibilityChanged(View* starting_from, bool is_visible); 73 virtual void VisibilityChanged(View* starting_from, bool is_visible);
74 virtual void Focus();
74 75
75 protected: 76 protected:
76 virtual void VisibleBoundsInRootChanged(); 77 virtual void VisibleBoundsInRootChanged();
77 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child); 78 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child);
78 virtual std::string GetClassName() const; 79 virtual std::string GetClassName() const;
79 virtual void Focus();
80 80
81 private: 81 private:
82 // The attached native view. 82 // The attached native view.
83 gfx::NativeView native_view_; 83 gfx::NativeView native_view_;
84 84
85 // A platform-specific wrapper that does the OS-level manipulation of the 85 // A platform-specific wrapper that does the OS-level manipulation of the
86 // attached gfx::NativeView. 86 // attached gfx::NativeView.
87 scoped_ptr<NativeViewHostWrapper> native_wrapper_; 87 scoped_ptr<NativeViewHostWrapper> native_wrapper_;
88 88
89 // The preferred size of this View 89 // The preferred size of this View
90 gfx::Size preferred_size_; 90 gfx::Size preferred_size_;
91 91
92 // True if the native view is being resized using the fast method described 92 // True if the native view is being resized using the fast method described
93 // in the setter/accessor above. 93 // in the setter/accessor above.
94 bool fast_resize_; 94 bool fast_resize_;
95 95
96 // The view that should be given focus when this NativeViewHost is focused. 96 // The view that should be given focus when this NativeViewHost is focused.
97 View* focus_view_; 97 View* focus_view_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(NativeViewHost); 99 DISALLOW_COPY_AND_ASSIGN(NativeViewHost);
100 }; 100 };
101 101
102 } // namespace views 102 } // namespace views
103 103
104 #endif // VIEWS_CONTROLS_NATIVE_VIEW_HOST_H_ 104 #endif // VIEWS_CONTROLS_NATIVE_VIEW_HOST_H_
OLDNEW
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_gtk.cc ('k') | views/controls/native/native_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698