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

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

Issue 11515005: Delay updating jumplist to avoid blocking the file thread at start-up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
OLDNEW
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_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 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/timer.h" 14 #include "base/timer.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "chrome/browser/debugger/devtools_window.h" 16 #include "chrome/browser/debugger/devtools_window.h"
17 #include "chrome/browser/infobars/infobar_container.h" 17 #include "chrome/browser/infobars/infobar_container.h"
18 #include "chrome/browser/ui/browser.h" 18 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_window.h" 19 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" 20 #include "chrome/browser/ui/tabs/tab_strip_model_observer.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/load_complete_listener.h"
22 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h" 23 #include "chrome/browser/ui/views/unhandled_keyboard_event_handler.h"
23 #include "ui/base/accelerators/accelerator.h" 24 #include "ui/base/accelerators/accelerator.h"
24 #include "ui/base/models/simple_menu_model.h" 25 #include "ui/base/models/simple_menu_model.h"
25 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
26 #include "ui/gfx/sys_color_change_listener.h" 27 #include "ui/gfx/sys_color_change_listener.h"
27 #include "ui/views/controls/button/button.h" 28 #include "ui/views/controls/button/button.h"
28 #include "ui/views/controls/single_split_view_listener.h" 29 #include "ui/views/controls/single_split_view_listener.h"
29 #include "ui/views/widget/widget_delegate.h" 30 #include "ui/views/widget/widget_delegate.h"
30 #include "ui/views/widget/widget_observer.h" 31 #include "ui/views/widget/widget_observer.h"
31 #include "ui/views/window/client_view.h" 32 #include "ui/views/window/client_view.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // 89 //
89 class BrowserView : public BrowserWindow, 90 class BrowserView : public BrowserWindow,
90 public BrowserWindowTesting, 91 public BrowserWindowTesting,
91 public TabStripModelObserver, 92 public TabStripModelObserver,
92 public ui::AcceleratorProvider, 93 public ui::AcceleratorProvider,
93 public views::WidgetDelegate, 94 public views::WidgetDelegate,
94 public views::WidgetObserver, 95 public views::WidgetObserver,
95 public views::ClientView, 96 public views::ClientView,
96 public InfoBarContainer::Delegate, 97 public InfoBarContainer::Delegate,
97 public views::SingleSplitViewListener, 98 public views::SingleSplitViewListener,
98 public gfx::SysColorChangeListener { 99 public gfx::SysColorChangeListener,
100 public LoadCompleteListener::Delegate {
99 public: 101 public:
100 // The browser view's class name. 102 // The browser view's class name.
101 static const char kViewClassName[]; 103 static const char kViewClassName[];
102 // Initial child indices for well-known views. 104 // Initial child indices for well-known views.
103 static const int kTabstripIndex; 105 static const int kTabstripIndex;
104 static const int kInfoBarIndex; 106 static const int kInfoBarIndex;
105 static const int kToolbarIndex; 107 static const int kToolbarIndex;
106 108
107 explicit BrowserView(Browser* browser); 109 explicit BrowserView(Browser* browser);
108 virtual ~BrowserView(); 110 virtual ~BrowserView();
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // Returns a new LayoutManager for this browser view. A subclass may 448 // Returns a new LayoutManager for this browser view. A subclass may
447 // override to implement different layout policy. 449 // override to implement different layout policy.
448 virtual views::LayoutManager* CreateLayoutManager() const; 450 virtual views::LayoutManager* CreateLayoutManager() const;
449 451
450 // Browser window related initializations. 452 // Browser window related initializations.
451 virtual void Init(); 453 virtual void Init();
452 454
453 // Callback for the loading animation(s) associated with this view. 455 // Callback for the loading animation(s) associated with this view.
454 virtual void LoadingAnimationCallback(); 456 virtual void LoadingAnimationCallback();
455 457
458 // LoadCompleteListener::Delegate implementation. Creates and initializes the
459 // |jumplist_| after the first page load.
460 virtual void OnLoadCompleted() OVERRIDE;
461
456 private: 462 private:
457 friend class BrowserViewLayout; 463 friend class BrowserViewLayout;
458 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest, 464 FRIEND_TEST_ALL_PREFIXES(BrowserViewsAccessibilityTest,
459 TestAboutChromeViewAccObj); 465 TestAboutChromeViewAccObj);
460 466
461 enum FullscreenType { 467 enum FullscreenType {
462 FOR_DESKTOP, 468 FOR_DESKTOP,
463 FOR_METRO 469 FOR_METRO
464 }; 470 };
465 471
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 695
690 // This object is initialized with the frame window HWND. This 696 // This object is initialized with the frame window HWND. This
691 // object is also passed as a tick handler with the ticker_ object. 697 // object is also passed as a tick handler with the ticker_ object.
692 // It is used to periodically monitor for hung plugin windows 698 // It is used to periodically monitor for hung plugin windows
693 HungWindowDetector hung_window_detector_; 699 HungWindowDetector hung_window_detector_;
694 700
695 // This object is invoked by hung_window_detector_ when it detects a hung 701 // This object is invoked by hung_window_detector_ when it detects a hung
696 // plugin window. 702 // plugin window.
697 HungPluginAction hung_plugin_action_; 703 HungPluginAction hung_plugin_action_;
698 704
705 // Helper class to listen for completion of first page load.
706 scoped_ptr<LoadCompleteListener> load_complete_listener_;
707
699 // The custom JumpList for Windows 7. 708 // The custom JumpList for Windows 7.
700 scoped_refptr<JumpList> jumplist_; 709 scoped_refptr<JumpList> jumplist_;
701 #endif 710 #endif
702 711
703 #if defined(USE_ASH) 712 #if defined(USE_ASH)
704 scoped_ptr<BrowserLauncherItemController> launcher_item_controller_; 713 scoped_ptr<BrowserLauncherItemController> launcher_item_controller_;
705 #endif 714 #endif
706 715
707 // The timer used to update frames for the Loading Animation. 716 // The timer used to update frames for the Loading Animation.
708 base::RepeatingTimer<BrowserView> loading_animation_timer_; 717 base::RepeatingTimer<BrowserView> loading_animation_timer_;
(...skipping 14 matching lines...) Expand all
723 gfx::ScopedSysColorChangeListener color_change_listener_; 732 gfx::ScopedSysColorChangeListener color_change_listener_;
724 733
725 scoped_ptr<InstantPreviewControllerViews> preview_controller_; 734 scoped_ptr<InstantPreviewControllerViews> preview_controller_;
726 735
727 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_; 736 mutable base::WeakPtrFactory<BrowserView> activate_modal_dialog_factory_;
728 737
729 DISALLOW_COPY_AND_ASSIGN(BrowserView); 738 DISALLOW_COPY_AND_ASSIGN(BrowserView);
730 }; 739 };
731 740
732 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_ 741 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698