diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 18:17:28 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 18:17:28 +0000 |
commit | 595513ffea29bc07d8b3a087fffe9f84a60ecc6f (patch) | |
tree | 124d5c04ed50f9b9717c6ba6173e27d92e7baeb1 /views/controls | |
parent | 9b6fee14acedde5c6b627d5f9b691776fc8d868c (diff) | |
download | chromium_src-595513ffea29bc07d8b3a087fffe9f84a60ecc6f.zip chromium_src-595513ffea29bc07d8b3a087fffe9f84a60ecc6f.tar.gz chromium_src-595513ffea29bc07d8b3a087fffe9f84a60ecc6f.tar.bz2 |
Reverting 27504, it breaks the interactive ui tests on Windows.
TBR=oshima
Review URL: http://codereview.chromium.org/243034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27512 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/button/button.cc | 1 | ||||
-rw-r--r-- | views/controls/button/native_button.cc | 2 | ||||
-rw-r--r-- | views/controls/button/text_button.cc | 1 | ||||
-rw-r--r-- | views/controls/tabbed_pane/native_tabbed_pane_gtk.cc | 15 | ||||
-rw-r--r-- | views/controls/tabbed_pane/native_tabbed_pane_gtk.h | 7 |
5 files changed, 3 insertions, 23 deletions
diff --git a/views/controls/button/button.cc b/views/controls/button/button.cc index 460c424..504a2f5 100644 --- a/views/controls/button/button.cc +++ b/views/controls/button/button.cc @@ -64,7 +64,6 @@ Button::Button(ButtonListener* listener) : listener_(listener), tag_(-1), mouse_event_flags_(0) { - SetFocusable(true); } void Button::NotifyClick(const views::Event& event) { diff --git a/views/controls/button/native_button.cc b/views/controls/button/native_button.cc index 76fb0ff..811fb56 100644 --- a/views/controls/button/native_button.cc +++ b/views/controls/button/native_button.cc @@ -36,6 +36,7 @@ NativeButton::NativeButton(ButtonListener* listener) is_default_(false), ignore_minimum_size_(false) { InitBorder(); + SetFocusable(true); } NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label) @@ -45,6 +46,7 @@ NativeButton::NativeButton(ButtonListener* listener, const std::wstring& label) ignore_minimum_size_(false) { SetLabel(label); // SetLabel takes care of label layout in RTL UI. InitBorder(); + SetFocusable(true); } NativeButton::~NativeButton() { diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc index 6bb3bec..b5733c0 100644 --- a/views/controls/button/text_button.cc +++ b/views/controls/button/text_button.cc @@ -330,7 +330,6 @@ void TextButton::SetEnabled(bool enabled) { } bool TextButton::OnMousePressed(const MouseEvent& e) { - RequestFocus(); return true; } diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc index 96e26df..6516c42 100644 --- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc +++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.cc @@ -119,13 +119,6 @@ void NativeTabbedPaneGtk::CreateNativeControl() { } //////////////////////////////////////////////////////////////////////////////// -// NativeTabbedPaneGtk, View override: - -FocusTraversable* NativeTabbedPaneGtk::GetFocusTraversable() { - return GetWidgetAt(GetSelectedTabIndex()); -} - -//////////////////////////////////////////////////////////////////////////////// // NativeTabbedPaneGtk, private: void NativeTabbedPaneGtk::DoAddTabAtIndex(int index, const std::wstring& title, View* contents, @@ -166,17 +159,11 @@ void NativeTabbedPaneGtk::DoAddTabAtIndex(int index, const std::wstring& title, gtk_notebook_set_current_page(GTK_NOTEBOOK(native_view()), 0); } -WidgetGtk* NativeTabbedPaneGtk::GetWidgetAt(int index) { +View* NativeTabbedPaneGtk::GetTabViewAt(int index) { DCHECK(index <= GetTabCount()); GtkWidget* page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(native_view()), index); WidgetGtk* widget = WidgetGtk::GetViewForNative(page); - DCHECK(widget); - return widget; -} - -View* NativeTabbedPaneGtk::GetTabViewAt(int index) { - WidgetGtk* widget = GetWidgetAt(index); DCHECK(widget && widget->GetRootView()->GetChildViewCount() == 1); return widget->GetRootView()->GetChildViewAt(0); } diff --git a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h index d586e74..63a70f7 100644 --- a/views/controls/tabbed_pane/native_tabbed_pane_gtk.h +++ b/views/controls/tabbed_pane/native_tabbed_pane_gtk.h @@ -36,18 +36,11 @@ class NativeTabbedPaneGtk : public NativeControlGtk, // NativeControlGtk overrides. virtual void CreateNativeControl(); - // View override: - virtual FocusTraversable* GetFocusTraversable(); - private: void DoAddTabAtIndex(int index, const std::wstring& title, View* contents, bool select_if_first_tab); - - // Returns the WidgetGtk containing the tab contents at |index|. - WidgetGtk* GetWidgetAt(int index); - View* GetTabViewAt(int index); void OnSwitchPage(int selected_tab_index); |