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

Side by Side Diff: chrome/views/tabbed_pane.h

Issue 15031: Input box's context menu/language settings should set ... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_VIEWS_TABBED_PANE_H__ 5 #ifndef CHROME_VIEWS_TABBED_PANE_H__
6 #define CHROME_VIEWS_TABBED_PANE_H__ 6 #define CHROME_VIEWS_TABBED_PANE_H__
7 7
8 #include "chrome/views/native_control.h" 8 #include "chrome/views/native_control.h"
9 9
10 namespace views { 10 namespace views {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 View* contents, 44 View* contents,
45 bool select_if_first_tab); 45 bool select_if_first_tab);
46 46
47 // Removes the tab at the specified |index| and returns the associated content 47 // Removes the tab at the specified |index| and returns the associated content
48 // view. The caller becomes the owner of the returned view. 48 // view. The caller becomes the owner of the returned view.
49 View* RemoveTabAtIndex(int index); 49 View* RemoveTabAtIndex(int index);
50 50
51 // Selects the tab at the specified |index|. 51 // Selects the tab at the specified |index|.
52 void SelectTabAt(int index); 52 void SelectTabAt(int index);
53 53
54 // Selects the tab with the specified |contents|.
55 void SelectTabForContents(const View* contents);
56
54 // Returns the number of tabs. 57 // Returns the number of tabs.
55 int GetTabCount(); 58 int GetTabCount();
56 59
57 virtual HWND CreateNativeControl(HWND parent_container); 60 virtual HWND CreateNativeControl(HWND parent_container);
58 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param); 61 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param);
59 62
60 virtual void Layout(); 63 virtual void Layout();
61 64
62 virtual RootView* GetContentsRootView(); 65 virtual RootView* GetContentsRootView();
63 virtual FocusTraversable* GetFocusTraversable(); 66 virtual FocusTraversable* GetFocusTraversable();
64 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); 67 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
65 68
66 private: 69 private:
67 // Changes the contents view to the view associated with the tab at |index|. 70 // Changes the contents view to the view associated with the tab at |index|.
68 void DoSelectTabAt(int index); 71 void DoSelectTabAt(int index);
69 72
73 // Gets the tab index from the specified |contents|. Returns -1 when no tab
74 // contains |contents|.
75 int GetIndexOfTab(const View* contents) const;
76
70 void ResizeContents(HWND tab_control); 77 void ResizeContents(HWND tab_control);
71 78
72 HWND tab_control_; 79 HWND tab_control_;
73 80
74 // The views associated with the different tabs. 81 // The views associated with the different tabs.
75 std::vector<View*> tab_views_; 82 std::vector<View*> tab_views_;
76 83
77 // The window displayed in the tab. 84 // The window displayed in the tab.
78 WidgetWin* content_window_; 85 WidgetWin* content_window_;
79 86
80 // The listener we notify about tab selection changes. 87 // The listener we notify about tab selection changes.
81 Listener* listener_; 88 Listener* listener_;
82 89
83 DISALLOW_EVIL_CONSTRUCTORS(TabbedPane); 90 DISALLOW_EVIL_CONSTRUCTORS(TabbedPane);
84 }; 91 };
85 92
86 } // namespace views 93 } // namespace views
87 94
88 #endif // #define CHROME_VIEWS_TABBED_PANE_H__ 95 #endif // #define CHROME_VIEWS_TABBED_PANE_H__
OLDNEW
« no previous file with comments | « chrome/browser/views/options/fonts_languages_window_view.cc ('k') | chrome/views/tabbed_pane.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698