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

Side by Side Diff: views/controls/tabbed_pane/native_tabbed_pane_gtk.cc

Issue 7349021: Convert some more view methods to the ui/views style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "views/controls/tabbed_pane/native_tabbed_pane_gtk.h" 5 #include "views/controls/tabbed_pane/native_tabbed_pane_gtk.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util-inl.h" 10 #include "base/stl_util-inl.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 index); 198 index);
199 Widget* widget = Widget::GetWidgetForNativeView(page); 199 Widget* widget = Widget::GetWidgetForNativeView(page);
200 DCHECK(widget); 200 DCHECK(widget);
201 return widget; 201 return widget;
202 } 202 }
203 203
204 View* NativeTabbedPaneGtk::GetTabViewAt(int index) { 204 View* NativeTabbedPaneGtk::GetTabViewAt(int index) {
205 Widget* widget = GetWidgetAt(index); 205 Widget* widget = GetWidgetAt(index);
206 DCHECK(widget); 206 DCHECK(widget);
207 DCHECK_EQ(1, widget->GetRootView()->child_count()); 207 DCHECK_EQ(1, widget->GetRootView()->child_count());
208 return widget->GetRootView()->GetChildViewAt(0); 208 return widget->GetRootView()->child_at(0);
209 } 209 }
210 210
211 void NativeTabbedPaneGtk::OnSwitchPage(int selected_tab_index) { 211 void NativeTabbedPaneGtk::OnSwitchPage(int selected_tab_index) {
212 TabbedPaneListener* listener = tabbed_pane_->listener(); 212 TabbedPaneListener* listener = tabbed_pane_->listener();
213 if (listener != NULL) 213 if (listener != NULL)
214 listener->TabSelectedAt(selected_tab_index); 214 listener->TabSelectedAt(selected_tab_index);
215 } 215 }
216 216
217 // static 217 // static
218 void NativeTabbedPaneGtk::CallSwitchPage(GtkNotebook* widget, 218 void NativeTabbedPaneGtk::CallSwitchPage(GtkNotebook* widget,
219 GtkNotebookPage* page, 219 GtkNotebookPage* page,
220 guint selected_tab_index, 220 guint selected_tab_index,
221 NativeTabbedPaneGtk* tabbed_pane) { 221 NativeTabbedPaneGtk* tabbed_pane) {
222 tabbed_pane->OnSwitchPage(selected_tab_index); 222 tabbed_pane->OnSwitchPage(selected_tab_index);
223 } 223 }
224 224
225 //////////////////////////////////////////////////////////////////////////////// 225 ////////////////////////////////////////////////////////////////////////////////
226 // NativeTabbedPaneWrapper, public: 226 // NativeTabbedPaneWrapper, public:
227 227
228 // static 228 // static
229 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper( 229 NativeTabbedPaneWrapper* NativeTabbedPaneWrapper::CreateNativeWrapper(
230 TabbedPane* tabbed_pane) { 230 TabbedPane* tabbed_pane) {
231 return new NativeTabbedPaneGtk(tabbed_pane); 231 return new NativeTabbedPaneGtk(tabbed_pane);
232 } 232 }
233 233
234 } // namespace views 234 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/single_split_view_unittest.cc ('k') | views/controls/tabbed_pane/native_tabbed_pane_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698