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

Side by Side Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 7232028: Fixes crash when closing tab then quickly right clicking. The problem (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 | « no previous file | 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/views/tabs/base_tab.h" 5 #include "chrome/browser/ui/views/tabs/base_tab.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 } 506 }
507 507
508 void BaseTab::ButtonPressed(views::Button* sender, const views::Event& event) { 508 void BaseTab::ButtonPressed(views::Button* sender, const views::Event& event) {
509 DCHECK(sender == close_button_); 509 DCHECK(sender == close_button_);
510 controller()->CloseTab(this); 510 controller()->CloseTab(this);
511 } 511 }
512 512
513 void BaseTab::ShowContextMenuForView(views::View* source, 513 void BaseTab::ShowContextMenuForView(views::View* source,
514 const gfx::Point& p, 514 const gfx::Point& p,
515 bool is_mouse_gesture) { 515 bool is_mouse_gesture) {
516 if (controller()) 516 if (controller() && !closing())
517 controller()->ShowContextMenuForTab(this, p); 517 controller()->ShowContextMenuForTab(this, p);
518 } 518 }
519 519
520 int BaseTab::loading_animation_frame() const { 520 int BaseTab::loading_animation_frame() const {
521 return loading_animation_frame_; 521 return loading_animation_frame_;
522 } 522 }
523 523
524 bool BaseTab::should_display_crashed_favicon() const { 524 bool BaseTab::should_display_crashed_favicon() const {
525 return should_display_crashed_favicon_; 525 return should_display_crashed_favicon_;
526 } 526 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 // static 575 // static
576 void BaseTab::InitResources() { 576 void BaseTab::InitResources() {
577 static bool initialized = false; 577 static bool initialized = false;
578 if (!initialized) { 578 if (!initialized) {
579 initialized = true; 579 initialized = true;
580 font_ = new gfx::Font( 580 font_ = new gfx::Font(
581 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont)); 581 ResourceBundle::GetSharedInstance().GetFont(ResourceBundle::BaseFont));
582 font_height_ = font_->GetHeight(); 582 font_height_ = font_->GetHeight();
583 } 583 }
584 } 584 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698