diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-30 00:38:38 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-30 00:38:38 +0000 |
commit | 1869411883c8ac422315fa702e3403df95bb0a3f (patch) | |
tree | 7983bb6c51bcca7b8102c6460e7bc2edee62a3f7 /chrome/browser | |
parent | fe44a4cacc61eecda10d67f6dc11aa3f5f31189f (diff) | |
download | chromium_src-1869411883c8ac422315fa702e3403df95bb0a3f.zip chromium_src-1869411883c8ac422315fa702e3403df95bb0a3f.tar.gz chromium_src-1869411883c8ac422315fa702e3403df95bb0a3f.tar.bz2 |
Fixes to make a browser window come up with TOOLKIT_VIEWS.
TBR=sky
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/116007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/infobars/infobars.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/location_bar_view.cc | 1 | ||||
-rw-r--r-- | chrome/browser/window_sizer.cc | 5 |
5 files changed, 16 insertions, 0 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 8ec46f1..129286f 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -281,9 +281,11 @@ void Browser::CreateBrowserWindow() { window_->GetLocationBar()->ShowFirstRunBubble(show_OEM_bubble); } +#if defined(OS_WIN) FindBar* find_bar = BrowserWindow::CreateFindBar(this); find_bar_controller_.reset(new FindBarController(find_bar)); find_bar->SetFindBarController(find_bar_controller_.get()); +#endif } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index b30d106..faf0f0b 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -621,7 +621,11 @@ BrowserWindowTesting* BrowserView::GetBrowserWindowTesting() { } StatusBubble* BrowserView::GetStatusBubble() { +#if !defined(TOOLKIT_VIEWS) return status_bubble_.get(); +#else + return NULL; +#endif } void BrowserView::SelectedTabToolbarSizeChanged(bool is_animating) { @@ -1333,6 +1337,7 @@ void BrowserView::Init() { } void BrowserView::InitSystemMenu() { +#if defined(OS_WIN) system_menu_.reset( views::Menu::GetSystemMenu(frame_->GetWindow()->GetNativeWindow())); int insertion_index = std::max(0, system_menu_->ItemCount() - 1); @@ -1352,6 +1357,7 @@ void BrowserView::InitSystemMenu() { } else { BuildMenuForTabStriplessWindow(system_menu_.get(), insertion_index); } +#endif } int BrowserView::LayoutTabStrip() { diff --git a/chrome/browser/views/infobars/infobars.cc b/chrome/browser/views/infobars/infobars.cc index 8bcf7e6..12fe42e 100644 --- a/chrome/browser/views/infobars/infobars.cc +++ b/chrome/browser/views/infobars/infobars.cc @@ -201,6 +201,7 @@ void InfoBar::AnimationEnded(const Animation* animation) { void InfoBar::InfoBarAdded() { // The container_ pointer must be set before adding to the view hierarchy. DCHECK(container_); +#if defined(OS_WIN) // When we're added to a view hierarchy within a widget, we create an // external focus tracker to track what was focused in case we obtain // focus so that we can restore focus when we're removed. @@ -210,6 +211,7 @@ void InfoBar::InfoBarAdded() { new views::ExternalFocusTracker(this, views::FocusManager::GetFocusManager(widget->GetNativeView()))); } +#endif } void InfoBar::InfoBarRemoved() { diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index 0aa957f..1138645 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -155,6 +155,7 @@ void LocationBarView::Init() { location_entry_.reset(new AutocompleteEditViewGtk(this, model_, profile_, command_updater_, popup_positioner_)); + location_entry_->Init(); #endif location_entry_view_ = new views::NativeViewHost; location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE); diff --git a/chrome/browser/window_sizer.cc b/chrome/browser/window_sizer.cc index e005676..890a4a6 100644 --- a/chrome/browser/window_sizer.cc +++ b/chrome/browser/window_sizer.cc @@ -116,6 +116,11 @@ void WindowSizer::GetBrowserWindowBounds(const std::wstring& app_name, Browser* browser, gfx::Rect* window_bounds, bool* maximized) { +#if defined(TOOLKIT_VIEWS) + *window_bounds = gfx::Rect(20, 20, 500, 500); + *maximized = false; + return; +#endif const WindowSizer sizer(new DefaultStateProvider(app_name, browser), CreateDefaultMonitorInfoProvider()); sizer.DetermineWindowBounds(specified_bounds, window_bounds, maximized); |