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

Side by Side Diff: chrome/browser/tabs/tab_strip_model_unittest.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
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_observer.cc ('k') | chrome/browser/ui/browser.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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "app/system_monitor.h" 8 #include "app/system_monitor.h"
9 #include "base/file_path.h" 9 #include "base/file_path.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 int index) { 334 int index) {
335 states_.push_back(new State(contents, index, CLOSE)); 335 states_.push_back(new State(contents, index, CLOSE));
336 } 336 }
337 virtual void TabDetachedAt(TabContentsWrapper* contents, int index) { 337 virtual void TabDetachedAt(TabContentsWrapper* contents, int index) {
338 states_.push_back(new State(contents, index, DETACH)); 338 states_.push_back(new State(contents, index, DETACH));
339 } 339 }
340 virtual void TabChangedAt(TabContentsWrapper* contents, int index, 340 virtual void TabChangedAt(TabContentsWrapper* contents, int index,
341 TabChangeType change_type) { 341 TabChangeType change_type) {
342 states_.push_back(new State(contents, index, CHANGE)); 342 states_.push_back(new State(contents, index, CHANGE));
343 } 343 }
344 virtual void TabReplacedAt(TabContentsWrapper* old_contents, 344 virtual void TabReplacedAt(TabStripModel* tab_strip_model,
345 TabContentsWrapper* new_contents, int index) { 345 TabContentsWrapper* old_contents,
346 TabContentsWrapper* new_contents,
347 int index) {
346 State* s = new State(new_contents, index, REPLACED); 348 State* s = new State(new_contents, index, REPLACED);
347 s ->src_contents = old_contents; 349 s ->src_contents = old_contents;
348 states_.push_back(s); 350 states_.push_back(s);
349 } 351 }
350 virtual void TabPinnedStateChanged(TabContentsWrapper* contents, int index) { 352 virtual void TabPinnedStateChanged(TabContentsWrapper* contents, int index) {
351 states_.push_back(new State(contents, index, PINNED)); 353 states_.push_back(new State(contents, index, PINNED));
352 } 354 }
353 virtual void TabStripEmpty() { 355 virtual void TabStripEmpty() {
354 empty_ = true; 356 empty_ = true;
355 } 357 }
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 TabStripModel strip(&delegate, profile()); 1892 TabStripModel strip(&delegate, profile());
1891 TabContentsWrapper* contents1 = CreateTabContents(); 1893 TabContentsWrapper* contents1 = CreateTabContents();
1892 TabContentsWrapper* contents2 = CreateTabContents(); 1894 TabContentsWrapper* contents2 = CreateTabContents();
1893 strip.AppendTabContents(contents1, true); 1895 strip.AppendTabContents(contents1, true);
1894 strip.AppendTabContents(contents2, true); 1896 strip.AppendTabContents(contents2, true);
1895 // DeleteTabContentsOnDestroyedObserver deletes contents1 when contents2 sends 1897 // DeleteTabContentsOnDestroyedObserver deletes contents1 when contents2 sends
1896 // out notification that it is being destroyed. 1898 // out notification that it is being destroyed.
1897 DeleteTabContentsOnDestroyedObserver observer(contents2, contents1); 1899 DeleteTabContentsOnDestroyedObserver observer(contents2, contents1);
1898 strip.CloseAllTabs(); 1900 strip.CloseAllTabs();
1899 } 1901 }
OLDNEW
« no previous file with comments | « chrome/browser/tabs/tab_strip_model_observer.cc ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698