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

Side by Side Diff: chrome/browser/ui/gtk/tabs/tab_gtk.cc

Issue 7310016: GTK: Now that we depend on gtk 2.18+, replace this pattern: (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
« no previous file with comments | « chrome/browser/ui/gtk/profile_menu_button.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_FLAGS(event_box_) & GTK_VISIBLE;
240 } 240 }
241 241
242 void TabGtk::SetVisible(bool visible) const { 242 void TabGtk::SetVisible(bool visible) const {
243 if (visible) { 243 gtk_widget_set_visible(event_box_, visible);
244 gtk_widget_show(event_box_);
245 } else {
246 gtk_widget_hide(event_box_);
247 }
248 } 244 }
249 245
250 void TabGtk::CloseButtonClicked() { 246 void TabGtk::CloseButtonClicked() {
251 delegate_->CloseTab(this); 247 delegate_->CloseTab(this);
252 } 248 }
253 249
254 void TabGtk::UpdateData(TabContents* contents, bool app, bool loading_only) { 250 void TabGtk::UpdateData(TabContents* contents, bool app, bool loading_only) {
255 TabRendererGtk::UpdateData(contents, app, loading_only); 251 TabRendererGtk::UpdateData(contents, app, loading_only);
256 // Cache the title width so we don't recalculate it every time the tab is 252 // Cache the title width so we don't recalculate it every time the tab is
257 // resized. 253 // resized.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 gdk_event_free(last_mouse_down_); 321 gdk_event_free(last_mouse_down_);
326 last_mouse_down_ = NULL; 322 last_mouse_down_ = NULL;
327 } 323 }
328 324
329 // Notify the drag helper that we're done with any potential drag operations. 325 // Notify the drag helper that we're done with any potential drag operations.
330 // Clean up the drag helper, which is re-created on the next mouse press. 326 // Clean up the drag helper, which is re-created on the next mouse press.
331 delegate_->EndDrag(canceled); 327 delegate_->EndDrag(canceled);
332 328
333 observer_.reset(); 329 observer_.reset();
334 } 330 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/profile_menu_button.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698