| OLD | NEW |
| 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 "chrome/browser/ui/gtk/tabs/tab_gtk.h" | 5 #include "chrome/browser/ui/gtk/tabs/tab_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 | 229 |
| 230 bool TabGtk::IsActive() const { | 230 bool TabGtk::IsActive() const { |
| 231 return delegate_->IsTabActive(this); | 231 return delegate_->IsTabActive(this); |
| 232 } | 232 } |
| 233 | 233 |
| 234 bool TabGtk::IsSelected() const { | 234 bool TabGtk::IsSelected() const { |
| 235 return delegate_->IsTabSelected(this); | 235 return delegate_->IsTabSelected(this); |
| 236 } | 236 } |
| 237 | 237 |
| 238 bool TabGtk::IsVisible() const { | 238 bool TabGtk::IsVisible() const { |
| 239 return GTK_WIDGET_FLAGS(event_box_) & GTK_VISIBLE; | 239 return gtk_widget_get_visible(event_box_); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void TabGtk::SetVisible(bool visible) const { | 242 void TabGtk::SetVisible(bool visible) const { |
| 243 gtk_widget_set_visible(event_box_, visible); | 243 gtk_widget_set_visible(event_box_, visible); |
| 244 } | 244 } |
| 245 | 245 |
| 246 void TabGtk::CloseButtonClicked() { | 246 void TabGtk::CloseButtonClicked() { |
| 247 delegate_->CloseTab(this); | 247 delegate_->CloseTab(this); |
| 248 } | 248 } |
| 249 | 249 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 gdk_event_free(last_mouse_down_); | 322 gdk_event_free(last_mouse_down_); |
| 323 last_mouse_down_ = NULL; | 323 last_mouse_down_ = NULL; |
| 324 } | 324 } |
| 325 | 325 |
| 326 // Notify the drag helper that we're done with any potential drag operations. | 326 // Notify the drag helper that we're done with any potential drag operations. |
| 327 // Clean up the drag helper, which is re-created on the next mouse press. | 327 // Clean up the drag helper, which is re-created on the next mouse press. |
| 328 delegate_->EndDrag(canceled); | 328 delegate_->EndDrag(canceled); |
| 329 | 329 |
| 330 observer_.reset(); | 330 observer_.reset(); |
| 331 } | 331 } |
| OLD | NEW |