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

Side by Side Diff: chrome/browser/ui/toolbar/wrench_menu_model.cc

Issue 6155003: Changes instant so that the newly created tab has a new id. Doing (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
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/ui/toolbar/wrench_menu_model.h" 5 #include "chrome/browser/ui/toolbar/wrench_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 327
328 void WrenchMenuModel::TabSelectedAt(TabContentsWrapper* old_contents, 328 void WrenchMenuModel::TabSelectedAt(TabContentsWrapper* old_contents,
329 TabContentsWrapper* new_contents, 329 TabContentsWrapper* new_contents,
330 int index, 330 int index,
331 bool user_gesture) { 331 bool user_gesture) {
332 // The user has switched between tabs and the new tab may have a different 332 // The user has switched between tabs and the new tab may have a different
333 // zoom setting. 333 // zoom setting.
334 UpdateZoomControls(); 334 UpdateZoomControls();
335 } 335 }
336 336
337 void WrenchMenuModel::TabReplacedAt(TabContentsWrapper* old_contents, 337 void WrenchMenuModel::TabReplacedAt(TabStripModel* tab_strip_model,
338 TabContentsWrapper* old_contents,
338 TabContentsWrapper* new_contents, 339 TabContentsWrapper* new_contents,
339 int index) { 340 int index) {
340 UpdateZoomControls(); 341 UpdateZoomControls();
341 } 342 }
342 343
343 void WrenchMenuModel::TabStripModelDeleted() { 344 void WrenchMenuModel::TabStripModelDeleted() {
344 // During views shutdown, the tabstrip model/browser is deleted first, while 345 // During views shutdown, the tabstrip model/browser is deleted first, while
345 // it is the opposite in gtk land. 346 // it is the opposite in gtk land.
346 tabstrip_model_->RemoveObserver(this); 347 tabstrip_model_->RemoveObserver(this);
347 tabstrip_model_ = NULL; 348 tabstrip_model_ = NULL;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 &enable_increment, &enable_decrement); 506 &enable_increment, &enable_decrement);
506 } 507 }
507 zoom_label_ = l10n_util::GetStringFUTF16( 508 zoom_label_ = l10n_util::GetStringFUTF16(
508 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 509 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
509 } 510 }
510 511
511 string16 WrenchMenuModel::GetSyncMenuLabel() const { 512 string16 WrenchMenuModel::GetSyncMenuLabel() const {
512 return sync_ui_util::GetSyncMenuLabel( 513 return sync_ui_util::GetSyncMenuLabel(
513 browser_->profile()->GetOriginalProfile()->GetProfileSyncService()); 514 browser_->profile()->GetOriginalProfile()->GetProfileSyncService());
514 } 515 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/toolbar/wrench_menu_model.h ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698