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