diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:38:26 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-18 17:38:26 +0000 |
commit | c22198534b75e5576b1ab7a5d3b00db48e057caf (patch) | |
tree | f1bd3aa45d92d4b490780bb063fbe35b417392c6 /chrome/browser/views/frame | |
parent | 5d1c2aa14ddacea07ca8dbf27c7d14055fdfb8e4 (diff) | |
download | chromium_src-c22198534b75e5576b1ab7a5d3b00db48e057caf.zip chromium_src-c22198534b75e5576b1ab7a5d3b00db48e057caf.tar.gz chromium_src-c22198534b75e5576b1ab7a5d3b00db48e057caf.tar.bz2 |
Remove BrowserWindow::Init().
This belongs as a private method of BrowserView. Neither mac nor linux uses it.
Review URL: http://codereview.chromium.org/42298
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 102 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.h | 4 |
2 files changed, 54 insertions, 52 deletions
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index b405280..e896fe4 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -432,57 +432,6 @@ void BrowserView::RegisterBrowserViewPrefs(PrefService* prefs) { /////////////////////////////////////////////////////////////////////////////// // BrowserView, BrowserWindow implementation: -void BrowserView::Init() { - // Stow a pointer to this object onto the window handle so that we can get - // at it later when all we have is a HWND. - SetProp(GetWidget()->GetNativeView(), kBrowserViewKey, this); - - // Start a hung plugin window detector for this browser object (as long as - // hang detection is not disabled). - if (!CommandLine::ForCurrentProcess()->HasSwitch( - switches::kDisableHangMonitor)) { - InitHangMonitor(); - } - - LoadAccelerators(); - SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); - - tabstrip_ = new TabStrip(browser_->tabstrip_model()); - tabstrip_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TABSTRIP)); - AddChildView(tabstrip_); - - toolbar_ = new BrowserToolbarView(browser_.get()); - AddChildView(toolbar_); - toolbar_->SetID(VIEW_ID_TOOLBAR); - toolbar_->Init(browser_->profile()); - toolbar_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TOOLBAR)); - - infobar_container_ = new InfoBarContainer(this); - AddChildView(infobar_container_); - - FindBarWin* find_bar_win = new FindBarWin(this); - - find_bar_controller_.reset(new FindBarController(find_bar_win)); - find_bar_win->set_find_bar_controller(find_bar_controller_.get()); - - contents_container_ = new TabContentsContainerView; - set_contents_view(contents_container_); - AddChildView(contents_container_); - - status_bubble_.reset(new StatusBubbleViews(GetWidget())); - -#ifdef CHROME_PERSONALIZATION - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - EnablePersonalization(!command_line.HasSwitch(switches::kDisableP13n)); - if (IsPersonalizationEnabled()) { - personalization_ = Personalization::CreateFramePersonalization( - browser_->profile(), this); - } -#endif - - InitSystemMenu(); -} - void BrowserView::Show() { // If the window is already visible, just activate it. if (frame_->IsVisible()) { @@ -1276,6 +1225,57 @@ void BrowserView::ViewHierarchyChanged(bool is_add, /////////////////////////////////////////////////////////////////////////////// // BrowserView, private: +void BrowserView::Init() { + // Stow a pointer to this object onto the window handle so that we can get + // at it later when all we have is a HWND. + SetProp(GetWidget()->GetNativeView(), kBrowserViewKey, this); + + // Start a hung plugin window detector for this browser object (as long as + // hang detection is not disabled). + if (!CommandLine::ForCurrentProcess()->HasSwitch( + switches::kDisableHangMonitor)) { + InitHangMonitor(); + } + + LoadAccelerators(); + SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); + + tabstrip_ = new TabStrip(browser_->tabstrip_model()); + tabstrip_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TABSTRIP)); + AddChildView(tabstrip_); + + toolbar_ = new BrowserToolbarView(browser_.get()); + AddChildView(toolbar_); + toolbar_->SetID(VIEW_ID_TOOLBAR); + toolbar_->Init(browser_->profile()); + toolbar_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_TOOLBAR)); + + infobar_container_ = new InfoBarContainer(this); + AddChildView(infobar_container_); + + FindBarWin* find_bar_win = new FindBarWin(this); + + find_bar_controller_.reset(new FindBarController(find_bar_win)); + find_bar_win->set_find_bar_controller(find_bar_controller_.get()); + + contents_container_ = new TabContentsContainerView; + set_contents_view(contents_container_); + AddChildView(contents_container_); + + status_bubble_.reset(new StatusBubbleViews(GetWidget())); + +#ifdef CHROME_PERSONALIZATION + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + EnablePersonalization(!command_line.HasSwitch(switches::kDisableP13n)); + if (IsPersonalizationEnabled()) { + personalization_ = Personalization::CreateFramePersonalization( + browser_->profile(), this); + } +#endif + + InitSystemMenu(); +} + void BrowserView::InitSystemMenu() { HMENU system_menu = GetSystemMenu(frame_->GetNativeView(), FALSE); system_menu_.reset(new Menu(system_menu)); diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index d1a57a5..6386999 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -162,7 +162,6 @@ class BrowserView : public BrowserWindow, static void RegisterBrowserViewPrefs(PrefService* prefs); // Overridden from BrowserWindow: - virtual void Init(); virtual void Show(); virtual void SetBounds(const gfx::Rect& bounds); virtual void Close(); @@ -275,6 +274,9 @@ class BrowserView : public BrowserWindow, RECT window_rect; }; + // Browser window related initializations. + void Init(); + // Creates the system menu. void InitSystemMenu(); |