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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.h

Issue 6121007: Revert 71230 to see if it is related to hang on linux interactive_ui_tests.... (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 | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('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) 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "app/menus/simple_menu_model.h" 13 #include "app/menus/simple_menu_model.h"
14 #include "base/scoped_ptr.h" 14 #include "base/scoped_ptr.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "build/build_config.h" 16 #include "build/build_config.h"
17 #include "chrome/browser/browser_window.h" 17 #include "chrome/browser/browser_window.h"
18 #include "chrome/browser/tabs/tab_strip_model_observer.h" 18 #include "chrome/browser/tabs/tab_strip_model_observer.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
20 #include "chrome/browser/ui/views/frame/browser_bubble_host.h" 20 #include "chrome/browser/ui/views/frame/browser_bubble_host.h"
21 #include "chrome/browser/ui/views/frame/browser_frame.h" 21 #include "chrome/browser/ui/views/frame/browser_frame.h"
22 #include "chrome/browser/ui/views/infobars/infobar_container.h" 22 #include "chrome/browser/ui/views/infobars/infobar_container.h"
23 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h" 23 #include "chrome/browser/ui/views/tab_contents/tab_contents_container.h"
24 #include "chrome/browser/ui/views/tabs/tab_strip.h" 24 #include "chrome/browser/ui/views/tabs/tab_strip.h"
25 #include "chrome/browser/ui/views/tabs/base_tab_strip.h" 25 #include "chrome/browser/ui/views/tabs/base_tab_strip.h"
26 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" 26 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
27 #include "chrome/common/notification_registrar.h" 27 #include "chrome/common/notification_registrar.h"
28 #include "gfx/native_widget_types.h" 28 #include "gfx/native_widget_types.h"
29 #include "views/controls/single_split_view.h"
30 #include "views/window/client_view.h" 29 #include "views/window/client_view.h"
31 #include "views/window/window_delegate.h" 30 #include "views/window/window_delegate.h"
32 31
33 #if defined(OS_WIN) 32 #if defined(OS_WIN)
34 #include "chrome/browser/hang_monitor/hung_plugin_action.h" 33 #include "chrome/browser/hang_monitor/hung_plugin_action.h"
35 #include "chrome/browser/hang_monitor/hung_window_detector.h" 34 #include "chrome/browser/hang_monitor/hung_window_detector.h"
36 #include "views/controls/menu/native_menu_win.h" 35 #include "views/controls/menu/native_menu_win.h"
37 #endif 36 #endif
38 37
39 // NOTE: For more information about the objects and files in this directory, 38 // NOTE: For more information about the objects and files in this directory,
40 // view: http://dev.chromium.org/developers/design-documents/browser-window 39 // view: http://dev.chromium.org/developers/design-documents/browser-window
41 40
42 class AccessiblePaneView; 41 class AccessiblePaneView;
43 class AccessibleViewHelper; 42 class AccessibleViewHelper;
44 class BookmarkBarView; 43 class BookmarkBarView;
45 class Browser; 44 class Browser;
46 class BrowserBubble; 45 class BrowserBubble;
47 class BrowserViewLayout; 46 class BrowserViewLayout;
48 class ContentsContainer; 47 class ContentsContainer;
49 class DownloadShelfView; 48 class DownloadShelfView;
50 class EncodingMenuModel; 49 class EncodingMenuModel;
51 class FullscreenExitBubble; 50 class FullscreenExitBubble;
52 class HtmlDialogUIDelegate; 51 class HtmlDialogUIDelegate;
53 class InfoBarContainer; 52 class InfoBarContainer;
54 class LocationBarView; 53 class LocationBarView;
55 class SideTabStrip; 54 class SideTabStrip;
56 class StatusBubbleViews; 55 class StatusBubbleViews;
57 class TabContentsContainer;
58 class TabStripModel; 56 class TabStripModel;
59 class ToolbarView; 57 class ToolbarView;
60 class ZoomMenuModel; 58 class ZoomMenuModel;
61 class Extension; 59 class Extension;
62 60
63 #if defined(OS_WIN) 61 #if defined(OS_WIN)
64 class AeroPeekManager; 62 class AeroPeekManager;
65 class JumpList; 63 class JumpList;
66 #endif 64 #endif
67 65
68 namespace views { 66 namespace views {
69 class ExternalFocusTracker; 67 class ExternalFocusTracker;
70 class Menu; 68 class Menu;
69 class SingleSplitView;
71 } 70 }
72 71
73 /////////////////////////////////////////////////////////////////////////////// 72 ///////////////////////////////////////////////////////////////////////////////
74 // BrowserView 73 // BrowserView
75 // 74 //
76 // A ClientView subclass that provides the contents of a browser window, 75 // A ClientView subclass that provides the contents of a browser window,
77 // including the TabStrip, toolbars, download shelves, the content area etc. 76 // including the TabStrip, toolbars, download shelves, the content area etc.
78 // 77 //
79 class BrowserView : public BrowserBubbleHost, 78 class BrowserView : public BrowserBubbleHost,
80 public BrowserWindow, 79 public BrowserWindow,
81 public BrowserWindowTesting, 80 public BrowserWindowTesting,
82 public NotificationObserver, 81 public NotificationObserver,
83 public TabStripModelObserver, 82 public TabStripModelObserver,
84 public menus::SimpleMenuModel::Delegate, 83 public menus::SimpleMenuModel::Delegate,
85 public views::WindowDelegate, 84 public views::WindowDelegate,
86 public views::ClientView, 85 public views::ClientView,
87 public InfoBarContainer::Delegate, 86 public InfoBarContainer::Delegate,
88 public views::SingleSplitView::Observer { 87 public TabContentsContainer::ReservedAreaDelegate {
89 public: 88 public:
90 // The browser view's class name. 89 // The browser view's class name.
91 static const char kViewClassName[]; 90 static const char kViewClassName[];
92 91
93 // Explicitly sets how windows are shown. Use a value of -1 to give the 92 // Explicitly sets how windows are shown. Use a value of -1 to give the
94 // default behavior. This is used during testing and not generally useful 93 // default behavior. This is used during testing and not generally useful
95 // otherwise. 94 // otherwise.
96 static void SetShowState(int state); 95 static void SetShowState(int state);
97 96
98 explicit BrowserView(Browser* browser); 97 explicit BrowserView(Browser* browser);
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 virtual views::ClientView* CreateClientView(views::Window* window); 389 virtual views::ClientView* CreateClientView(views::Window* window);
391 390
392 // Overridden from views::ClientView: 391 // Overridden from views::ClientView:
393 virtual bool CanClose() const; 392 virtual bool CanClose() const;
394 virtual int NonClientHitTest(const gfx::Point& point); 393 virtual int NonClientHitTest(const gfx::Point& point);
395 virtual gfx::Size GetMinimumSize(); 394 virtual gfx::Size GetMinimumSize();
396 395
397 // InfoBarContainer::Delegate overrides 396 // InfoBarContainer::Delegate overrides
398 virtual void InfoBarSizeChanged(bool is_animating); 397 virtual void InfoBarSizeChanged(bool is_animating);
399 398
400 // views::SingleSplitView::Observer overrides: 399 // TabContentsContainer::ReservedAreaDelegate overrides.
401 virtual bool SplitHandleMoved(views::SingleSplitView* view); 400 virtual void UpdateReservedContentsRect(const TabContentsContainer* source);
402 401
403 protected: 402 protected:
404 // Appends to |toolbars| a pointer to each AccessiblePaneView that 403 // Appends to |toolbars| a pointer to each AccessiblePaneView that
405 // can be traversed using F6, in the order they should be traversed. 404 // can be traversed using F6, in the order they should be traversed.
406 // Abstracted here so that it can be extended for Chrome OS. 405 // Abstracted here so that it can be extended for Chrome OS.
407 virtual void GetAccessiblePanes( 406 virtual void GetAccessiblePanes(
408 std::vector<AccessiblePaneView*>* panes); 407 std::vector<AccessiblePaneView*>* panes);
409 408
410 // Save the current focused view to view storage 409 // Save the current focused view to view storage
411 void SaveFocusedView(); 410 void SaveFocusedView();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 void UpdateAcceleratorMetrics(const views::Accelerator& accelerator, 515 void UpdateAcceleratorMetrics(const views::Accelerator& accelerator,
517 int command_id); 516 int command_id);
518 517
519 // Invoked from TabSelectedAt or when instant is made active. Is 518 // Invoked from TabSelectedAt or when instant is made active. Is
520 // |change_tab_contents| is true, |new_contents| is added to the view 519 // |change_tab_contents| is true, |new_contents| is added to the view
521 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents| 520 // hierarchy, if |change_tab_contents| is false, it's assumed |new_contents|
522 // has already been added to the view hierarchy. 521 // has already been added to the view hierarchy.
523 void ProcessTabSelected(TabContentsWrapper* new_contents, 522 void ProcessTabSelected(TabContentsWrapper* new_contents,
524 bool change_tab_contents); 523 bool change_tab_contents);
525 524
526 // Exposes resize corner size to BrowserViewLayout.
527 gfx::Size GetResizeCornerSize() const;
528
529 // Last focused view that issued a tab traversal. 525 // Last focused view that issued a tab traversal.
530 int last_focused_view_storage_id_; 526 int last_focused_view_storage_id_;
531 527
532 // The BrowserFrame that hosts this view. 528 // The BrowserFrame that hosts this view.
533 BrowserFrame* frame_; 529 BrowserFrame* frame_;
534 530
535 // The Browser object we are associated with. 531 // The Browser object we are associated with.
536 scoped_ptr<Browser> browser_; 532 scoped_ptr<Browser> browser_;
537 533
538 // BrowserView layout (LTR one is pictured here). 534 // BrowserView layout (LTR one is pictured here).
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_; 667 UnhandledKeyboardEventHandler unhandled_keyboard_event_handler_;
672 668
673 scoped_ptr<AccessibleViewHelper> accessible_view_helper_; 669 scoped_ptr<AccessibleViewHelper> accessible_view_helper_;
674 670
675 NotificationRegistrar registrar_; 671 NotificationRegistrar registrar_;
676 672
677 DISALLOW_COPY_AND_ASSIGN(BrowserView); 673 DISALLOW_COPY_AND_ASSIGN(BrowserView);
678 }; 674 };
679 675
680 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 676 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698