OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 virtual ToolbarView* GetToolbarView() const OVERRIDE; | 349 virtual ToolbarView* GetToolbarView() const OVERRIDE; |
350 | 350 |
351 // Overridden from NotificationObserver: | 351 // Overridden from NotificationObserver: |
352 virtual void Observe(NotificationType type, | 352 virtual void Observe(NotificationType type, |
353 const NotificationSource& source, | 353 const NotificationSource& source, |
354 const NotificationDetails& details) OVERRIDE; | 354 const NotificationDetails& details) OVERRIDE; |
355 | 355 |
356 // Overridden from TabStripModelObserver: | 356 // Overridden from TabStripModelObserver: |
357 virtual void TabDetachedAt(TabContentsWrapper* contents, int index) OVERRIDE; | 357 virtual void TabDetachedAt(TabContentsWrapper* contents, int index) OVERRIDE; |
358 virtual void TabDeselected(TabContentsWrapper* contents) OVERRIDE; | 358 virtual void TabDeselected(TabContentsWrapper* contents) OVERRIDE; |
359 virtual void TabSelectedAt(TabContentsWrapper* old_contents, | 359 virtual void ActiveTabChanged(TabContentsWrapper* old_contents, |
360 TabContentsWrapper* new_contents, | 360 TabContentsWrapper* new_contents, |
361 int index, | 361 int index, |
362 bool user_gesture) OVERRIDE; | 362 bool user_gesture) OVERRIDE; |
363 virtual void TabReplacedAt(TabStripModel* tab_strip_model, | 363 virtual void TabReplacedAt(TabStripModel* tab_strip_model, |
364 TabContentsWrapper* old_contents, | 364 TabContentsWrapper* old_contents, |
365 TabContentsWrapper* new_contents, | 365 TabContentsWrapper* new_contents, |
366 int index) OVERRIDE; | 366 int index) OVERRIDE; |
367 virtual void TabStripEmpty() OVERRIDE; | 367 virtual void TabStripEmpty() OVERRIDE; |
368 | 368 |
369 // Overridden from ui::SimpleMenuModel::Delegate: | 369 // Overridden from ui::SimpleMenuModel::Delegate: |
370 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 370 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
371 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 371 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
372 virtual bool GetAcceleratorForCommandId( | 372 virtual bool GetAcceleratorForCommandId( |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 | 533 |
534 // Initialize the hung plugin detector. | 534 // Initialize the hung plugin detector. |
535 void InitHangMonitor(); | 535 void InitHangMonitor(); |
536 | 536 |
537 // Possibly records a user metrics action corresponding to the passed-in | 537 // Possibly records a user metrics action corresponding to the passed-in |
538 // accelerator. Only implemented for Chrome OS, where we're interested in | 538 // accelerator. Only implemented for Chrome OS, where we're interested in |
539 // learning about how frequently the top-row keys are used. | 539 // learning about how frequently the top-row keys are used. |
540 void UpdateAcceleratorMetrics(const views::Accelerator& accelerator, | 540 void UpdateAcceleratorMetrics(const views::Accelerator& accelerator, |
541 int command_id); | 541 int command_id); |
542 | 542 |
543 // Invoked from TabSelectedAt or when instant is made active. If | 543 // Invoked from ActiveTabChanged or when instant is made active. If |
544 // |change_tab_contents| is true, |new_contents| is added to the view | 544 // |change_tab_contents| is true, |new_contents| is added to the view |
545 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents| | 545 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents| |
546 // has already been added to the view hierarchy. | 546 // has already been added to the view hierarchy. |
547 void ProcessTabSelected(TabContentsWrapper* new_contents, | 547 void ProcessTabSelected(TabContentsWrapper* new_contents, |
548 bool change_tab_contents); | 548 bool change_tab_contents); |
549 | 549 |
550 // Exposes resize corner size to BrowserViewLayout. | 550 // Exposes resize corner size to BrowserViewLayout. |
551 gfx::Size GetResizeCornerSize() const; | 551 gfx::Size GetResizeCornerSize() const; |
552 | 552 |
553 // Shows the about chrome modal dialog and returns the Window object. | 553 // Shows the about chrome modal dialog and returns the Window object. |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 | 718 |
719 NotificationRegistrar registrar_; | 719 NotificationRegistrar registrar_; |
720 | 720 |
721 // Used to measure the loading spinner animation rate. | 721 // Used to measure the loading spinner animation rate. |
722 base::TimeTicks last_animation_time_; | 722 base::TimeTicks last_animation_time_; |
723 | 723 |
724 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 724 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
725 }; | 725 }; |
726 | 726 |
727 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 727 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
OLD | NEW |