| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 virtual bool IsTabStripVisible() const; | 155 virtual bool IsTabStripVisible() const; |
| 156 | 156 |
| 157 // Returns true if the profile associated with this Browser window is | 157 // Returns true if the profile associated with this Browser window is |
| 158 // incognito. | 158 // incognito. |
| 159 bool IsOffTheRecord() const; | 159 bool IsOffTheRecord() const; |
| 160 | 160 |
| 161 // Returns true if the non-client view should render an avatar icon. | 161 // Returns true if the non-client view should render an avatar icon. |
| 162 virtual bool ShouldShowAvatar() const; | 162 virtual bool ShouldShowAvatar() const; |
| 163 | 163 |
| 164 // Handle the specified |accelerator| being pressed. | 164 // Handle the specified |accelerator| being pressed. |
| 165 virtual bool AcceleratorPressed(const views::Accelerator& accelerator); | 165 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator); |
| 166 | 166 |
| 167 // Provides the containing frame with the accelerator for the specified | 167 // Provides the containing frame with the accelerator for the specified |
| 168 // command id. This can be used to provide menu item shortcut hints etc. | 168 // command id. This can be used to provide menu item shortcut hints etc. |
| 169 // Returns true if an accelerator was found for the specified |cmd_id|, false | 169 // Returns true if an accelerator was found for the specified |cmd_id|, false |
| 170 // otherwise. | 170 // otherwise. |
| 171 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); | 171 bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); |
| 172 | 172 |
| 173 // Shows the next app-modal dialog box, if there is one to be shown, or moves | 173 // Shows the next app-modal dialog box, if there is one to be shown, or moves |
| 174 // an existing showing one to the front. Returns true if one was shown or | 174 // an existing showing one to the front. Returns true if one was shown or |
| 175 // activated, false if none was shown. | 175 // activated, false if none was shown. |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 | 544 |
| 545 // Retrieves the command id for the specified Windows app command. | 545 // Retrieves the command id for the specified Windows app command. |
| 546 int GetCommandIDForAppCommandID(int app_command_id) const; | 546 int GetCommandIDForAppCommandID(int app_command_id) const; |
| 547 | 547 |
| 548 // Initialize the hung plugin detector. | 548 // Initialize the hung plugin detector. |
| 549 void InitHangMonitor(); | 549 void InitHangMonitor(); |
| 550 | 550 |
| 551 // Possibly records a user metrics action corresponding to the passed-in | 551 // Possibly records a user metrics action corresponding to the passed-in |
| 552 // accelerator. Only implemented for Chrome OS, where we're interested in | 552 // accelerator. Only implemented for Chrome OS, where we're interested in |
| 553 // learning about how frequently the top-row keys are used. | 553 // learning about how frequently the top-row keys are used. |
| 554 void UpdateAcceleratorMetrics(const views::Accelerator& accelerator, | 554 void UpdateAcceleratorMetrics(const ui::Accelerator& accelerator, |
| 555 int command_id); | 555 int command_id); |
| 556 | 556 |
| 557 // Invoked from ActiveTabChanged or when instant is made active. | 557 // Invoked from ActiveTabChanged or when instant is made active. |
| 558 // |new_contents| must not be NULL. | 558 // |new_contents| must not be NULL. |
| 559 void ProcessTabSelected(TabContentsWrapper* new_contents); | 559 void ProcessTabSelected(TabContentsWrapper* new_contents); |
| 560 | 560 |
| 561 // Exposes resize corner size to BrowserViewLayout. | 561 // Exposes resize corner size to BrowserViewLayout. |
| 562 gfx::Size GetResizeCornerSize() const; | 562 gfx::Size GetResizeCornerSize() const; |
| 563 | 563 |
| 564 // Shows the about chrome modal dialog and returns the Window object. | 564 // Shows the about chrome modal dialog and returns the Window object. |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 662 | 662 |
| 663 // Tracks and stores the last focused view which is not the | 663 // Tracks and stores the last focused view which is not the |
| 664 // devtools_container_ or any of its children. Used to restore focus once | 664 // devtools_container_ or any of its children. Used to restore focus once |
| 665 // the devtools_container_ is hidden. | 665 // the devtools_container_ is hidden. |
| 666 scoped_ptr<views::ExternalFocusTracker> devtools_focus_tracker_; | 666 scoped_ptr<views::ExternalFocusTracker> devtools_focus_tracker_; |
| 667 | 667 |
| 668 // The Status information bubble that appears at the bottom of the window. | 668 // The Status information bubble that appears at the bottom of the window. |
| 669 scoped_ptr<StatusBubbleViews> status_bubble_; | 669 scoped_ptr<StatusBubbleViews> status_bubble_; |
| 670 | 670 |
| 671 // A mapping between accelerators and commands. | 671 // A mapping between accelerators and commands. |
| 672 std::map<views::Accelerator, int> accelerator_table_; | 672 std::map<ui::Accelerator, int> accelerator_table_; |
| 673 | 673 |
| 674 // True if we have already been initialized. | 674 // True if we have already been initialized. |
| 675 bool initialized_; | 675 bool initialized_; |
| 676 | 676 |
| 677 // True if we should ignore requests to layout. This is set while toggling | 677 // True if we should ignore requests to layout. This is set while toggling |
| 678 // fullscreen mode on and off to reduce jankiness. | 678 // fullscreen mode on and off to reduce jankiness. |
| 679 bool ignore_layout_; | 679 bool ignore_layout_; |
| 680 | 680 |
| 681 scoped_ptr<FullscreenExitBubbleViews> fullscreen_bubble_; | 681 scoped_ptr<FullscreenExitBubbleViews> fullscreen_bubble_; |
| 682 | 682 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 // If this flag is set then SetFocusToLocationBar() will set focus to the | 725 // If this flag is set then SetFocusToLocationBar() will set focus to the |
| 726 // location bar even if the browser window is not active. | 726 // location bar even if the browser window is not active. |
| 727 bool force_location_bar_focus_; | 727 bool force_location_bar_focus_; |
| 728 | 728 |
| 729 PendingFullscreenRequest fullscreen_request_; | 729 PendingFullscreenRequest fullscreen_request_; |
| 730 | 730 |
| 731 DISALLOW_COPY_AND_ASSIGN(BrowserView); | 731 DISALLOW_COPY_AND_ASSIGN(BrowserView); |
| 732 }; | 732 }; |
| 733 | 733 |
| 734 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ | 734 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |