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

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

Issue 2821011: Removes phantom tabs. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.h ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/gtk/tabs/tab_gtk.h" 5 #include "chrome/browser/gtk/tabs/tab_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include "app/gtk_dnd_util.h" 9 #include "app/gtk_dnd_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 } else { 312 } else {
313 gtk_widget_hide(event_box_); 313 gtk_widget_hide(event_box_);
314 } 314 }
315 } 315 }
316 316
317 void TabGtk::CloseButtonClicked() { 317 void TabGtk::CloseButtonClicked() {
318 delegate_->CloseTab(this); 318 delegate_->CloseTab(this);
319 } 319 }
320 320
321 void TabGtk::UpdateData(TabContents* contents, 321 void TabGtk::UpdateData(TabContents* contents,
322 bool phantom,
323 bool loading_only) { 322 bool loading_only) {
324 TabRendererGtk::UpdateData(contents, phantom, loading_only); 323 TabRendererGtk::UpdateData(contents, loading_only);
325 // Cache the title width so we don't recalculate it every time the tab is 324 // Cache the title width so we don't recalculate it every time the tab is
326 // resized. 325 // resized.
327 title_width_ = GetTitleWidth(title_font(), GetTitle()); 326 title_width_ = GetTitleWidth(title_font(), GetTitle());
328 UpdateTooltipState(); 327 UpdateTooltipState();
329 } 328 }
330 329
331 void TabGtk::SetBounds(const gfx::Rect& bounds) { 330 void TabGtk::SetBounds(const gfx::Rect& bounds) {
332 TabRendererGtk::SetBounds(bounds); 331 TabRendererGtk::SetBounds(bounds);
333 UpdateTooltipState(); 332 UpdateTooltipState();
334 } 333 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 gdk_event_free(last_mouse_down_); 400 gdk_event_free(last_mouse_down_);
402 last_mouse_down_ = NULL; 401 last_mouse_down_ = NULL;
403 } 402 }
404 403
405 // Notify the drag helper that we're done with any potential drag operations. 404 // Notify the drag helper that we're done with any potential drag operations.
406 // Clean up the drag helper, which is re-created on the next mouse press. 405 // Clean up the drag helper, which is re-created on the next mouse press.
407 delegate_->EndDrag(canceled); 406 delegate_->EndDrag(canceled);
408 407
409 observer_.reset(); 408 observer_.reset();
410 } 409 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/tabs/tab_gtk.h ('k') | chrome/browser/gtk/tabs/tab_renderer_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698