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

Unified Diff: ui/views/controls/tabbed_pane/native_tabbed_pane_views.h

Issue 8687013: Get the examples to run in aura_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/OWNERS ('k') | ui/views/controls/tabbed_pane/native_tabbed_pane_views.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/tabbed_pane/native_tabbed_pane_views.h
===================================================================
--- ui/views/controls/tabbed_pane/native_tabbed_pane_views.h (revision 0)
+++ ui/views/controls/tabbed_pane/native_tabbed_pane_views.h (revision 0)
@@ -0,0 +1,77 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_VIEWS_H_
+#define UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_VIEWS_H_
+#pragma once
+
+#include <vector>
+
+#include "ui/views/controls/tabbed_pane/native_tabbed_pane_wrapper.h"
+#include "views/view.h"
+
+namespace views {
+
+class TabLayout;
+class TabStrip;
+class Widget;
+
+class NativeTabbedPaneViews : public View,
+ public NativeTabbedPaneWrapper {
+ public:
+ explicit NativeTabbedPaneViews(TabbedPane* tabbed_pane);
+ virtual ~NativeTabbedPaneViews();
+
+ void TabSelectionChanged(View* selected);
+
+ // Overridden from NativeTabbedPaneWrapper:
+ virtual void AddTab(const string16& title, View* contents) OVERRIDE;
+ virtual void AddTabAtIndex(int index,
+ const string16& title,
+ View* contents,
+ bool select_if_first_tab) OVERRIDE;
+ virtual View* RemoveTabAtIndex(int index) OVERRIDE;
+ virtual void SelectTabAt(int index) OVERRIDE;
+ virtual int GetTabCount() OVERRIDE;
+ virtual int GetSelectedTabIndex() OVERRIDE;
+ virtual View* GetSelectedTab() OVERRIDE;
+ virtual View* GetView() OVERRIDE;
+ virtual void SetFocus() OVERRIDE;
+ virtual gfx::Size GetPreferredSize() OVERRIDE;
+ virtual gfx::NativeView GetTestingHandle() const OVERRIDE;
+
+ // View overrides:
+ virtual void Layout() OVERRIDE;
+ virtual FocusTraversable* GetFocusTraversable() OVERRIDE;
+ virtual void ViewHierarchyChanged(bool is_add, View *parent,
+ View *child) OVERRIDE;
+
+ private:
+ void InitControl();
+
+ // Called upon creation of native control to initialize tabs that are added
+ // before the native control is created.
+ void InitializeTabs();
+
+ // Adds a tab with the given content to native control at the given index.
+ void AddNativeTab(int index, const string16& title);
+
+ // The tabbed-pane we are bound to.
+ TabbedPane* tabbed_pane_;
+
+ // The layout manager we use for managing our tabs.
+ TabLayout* tab_layout_manager_;
+
+ // TabStrip.
+ TabStrip* tab_strip_;
+
+ // The window displayed in the tab.
+ Widget* content_window_;
+
+ DISALLOW_COPY_AND_ASSIGN(NativeTabbedPaneViews);
+};
+
+} // namespace views
+
+#endif // UI_VIEWS_CONTROLS_TABBED_PANE_NATIVE_TABBED_PANE_VIEWS_H_
Property changes on: ui\views\controls\tabbed_pane\native_tabbed_pane_views.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « ui/views/OWNERS ('k') | ui/views/controls/tabbed_pane/native_tabbed_pane_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698