OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 // Makes sure the tabs from the anchor to |index| are selected. This only | 362 // Makes sure the tabs from the anchor to |index| are selected. This only |
363 // adds to the selection. | 363 // adds to the selection. |
364 void AddSelectionFromAnchorTo(int index); | 364 void AddSelectionFromAnchorTo(int index); |
365 | 365 |
366 // Returns true if the tab at |index| is selected. | 366 // Returns true if the tab at |index| is selected. |
367 bool IsTabSelected(int index) const; | 367 bool IsTabSelected(int index) const; |
368 | 368 |
369 // Sets the selection to match that of |source|. | 369 // Sets the selection to match that of |source|. |
370 void SetSelectionFromModel(const ui::ListSelectionModel& source); | 370 void SetSelectionFromModel(const ui::ListSelectionModel& source); |
371 | 371 |
| 372 // Notifies observers that a WebContents is zooming. |
| 373 void WebContentsZoomChange(content::WebContents* contents, |
| 374 double old_zoom_level, |
| 375 double new_zoom_level, |
| 376 content::ZoomMode zoom_mode); |
| 377 |
372 const ui::ListSelectionModel& selection_model() const { | 378 const ui::ListSelectionModel& selection_model() const { |
373 return selection_model_; | 379 return selection_model_; |
374 } | 380 } |
375 | 381 |
376 // Command level API ///////////////////////////////////////////////////////// | 382 // Command level API ///////////////////////////////////////////////////////// |
377 | 383 |
378 // Adds a WebContents at the best position in the TabStripModel given | 384 // Adds a WebContents at the best position in the TabStripModel given |
379 // the specified insertion index, transition, etc. |add_types| is a bitmask of | 385 // the specified insertion index, transition, etc. |add_types| is a bitmask of |
380 // AddTabTypes; see it for details. This method ends up calling into | 386 // AddTabTypes; see it for details. This method ends up calling into |
381 // InsertWebContentsAt to do the actual insertion. Pass kNoTab for |index| to | 387 // InsertWebContentsAt to do the actual insertion. Pass kNoTab for |index| to |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 | 579 |
574 ui::ListSelectionModel selection_model_; | 580 ui::ListSelectionModel selection_model_; |
575 | 581 |
576 // TODO(sky): remove this; used for debugging 291265. | 582 // TODO(sky): remove this; used for debugging 291265. |
577 bool in_notify_; | 583 bool in_notify_; |
578 | 584 |
579 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); | 585 DISALLOW_IMPLICIT_CONSTRUCTORS(TabStripModel); |
580 }; | 586 }; |
581 | 587 |
582 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ | 588 #endif // CHROME_BROWSER_UI_TABS_TAB_STRIP_MODEL_H_ |
OLD | NEW |