diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 00:15:50 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 00:15:50 +0000 |
commit | bb678330f8aeb30f169129dc32ff8fecef60d58e (patch) | |
tree | 59784e193346bcf883c664ca0497f3909575e46f /chrome | |
parent | 54dbf3b1b77a3d33f16cc4bf6efc9eec4404d4ef (diff) | |
download | chromium_src-bb678330f8aeb30f169129dc32ff8fecef60d58e.zip chromium_src-bb678330f8aeb30f169129dc32ff8fecef60d58e.tar.gz chromium_src-bb678330f8aeb30f169129dc32ff8fecef60d58e.tar.bz2 |
Resurrect toolkit_views build.
Review URL: http://codereview.chromium.org/155797
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 5 | ||||
-rw-r--r-- | chrome/browser/browser.h | 3 | ||||
-rw-r--r-- | chrome/browser/browser_init.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser_window.h | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 3 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_delegate.h | 3 | ||||
-rw-r--r-- | chrome/browser/views/browser_dialogs.h | 2 | ||||
-rw-r--r-- | chrome/browser/views/dialog_stubs_gtk.cc | 13 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 6 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.h | 3 | ||||
-rw-r--r-- | chrome/browser/views/page_info_window_view.cc | 24 | ||||
-rw-r--r-- | chrome/chrome.gyp | 6 |
12 files changed, 45 insertions, 28 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index 8567bd0..e1f5ff4 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -1989,12 +1989,11 @@ void Browser::ConfirmAddSearchProvider(const TemplateURL* template_url, window()->ConfirmAddSearchProvider(template_url, profile); } -void Browser::ShowPageInfo(gfx::NativeView parent, - Profile* profile, +void Browser::ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history) { - window()->ShowPageInfo(parent, profile, url, ssl, show_history); + window()->ShowPageInfo(profile, url, ssl, show_history); } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 2dd56b1..8536718 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -496,8 +496,7 @@ class Browser : public TabStripModelDelegate, virtual void OnStartDownload(DownloadItem* download); virtual void ConfirmAddSearchProvider(const TemplateURL* template_url, Profile* profile); - virtual void ShowPageInfo(gfx::NativeView parent, - Profile* profile, + virtual void ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history); diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index f7595a1..acab527 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -437,7 +437,7 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, browser = BrowserList::GetLastActive(); OpenURLsInBrowser(browser, process_startup, urls_to_open); } -#if defined(OS_LINUX) && !defined(OS_CHROMEOS) +#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && !defined(TOOLKIT_VIEWS) // TODO(port): Remove ifdef when the Linux splash page is not needed. const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess(); // This can mess up UI tests, so only do it when UI tests aren't running. diff --git a/chrome/browser/browser_window.h b/chrome/browser/browser_window.h index ae07777..234b4411 100644 --- a/chrome/browser/browser_window.h +++ b/chrome/browser/browser_window.h @@ -225,8 +225,7 @@ class BrowserWindow { // |url| is the url of the page/frame the info applies to, |ssl| is the SSL // information for that page/frame. If |show_history| is true, a section // showing how many times that URL has been visited is added to the page info. - virtual void ShowPageInfo(gfx::NativeView parent, - Profile* profile, + virtual void ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history) = 0; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index ffb6d7d..e0b57da 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -757,8 +757,7 @@ void TabContents::ShowPageInfo(const GURL& url, if (!delegate_) return; - delegate_->ShowPageInfo(GetContentNativeView(), profile(), url, ssl, - show_history); + delegate_->ShowPageInfo(profile(), url, ssl, show_history); } #if defined(OS_WIN) || defined(OS_LINUX) diff --git a/chrome/browser/tab_contents/tab_contents_delegate.h b/chrome/browser/tab_contents/tab_contents_delegate.h index f24551d..d9cbe3b 100644 --- a/chrome/browser/tab_contents/tab_contents_delegate.h +++ b/chrome/browser/tab_contents/tab_contents_delegate.h @@ -212,8 +212,7 @@ class TabContentsDelegate { // |url| is the url of the page/frame the info applies to, |ssl| is the SSL // information for that page/frame. If |show_history| is true, a section // showing how many times that URL has been visited is added to the page info. - virtual void ShowPageInfo(gfx::NativeView parent, - Profile* profile, + virtual void ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history) { diff --git a/chrome/browser/views/browser_dialogs.h b/chrome/browser/views/browser_dialogs.h index 58253ad..8806976 100644 --- a/chrome/browser/views/browser_dialogs.h +++ b/chrome/browser/views/browser_dialogs.h @@ -102,7 +102,7 @@ void EditSearchEngine(gfx::NativeWindow parent, // |url| is the url of the page/frame the info applies to, |ssl| is the SSL // information for that page/frame. If |show_history| is true, a section // showing how many times that URL has been visited is added to the page info. -void ShowPageInfo(gfx::NativeView parent, +void ShowPageInfo(gfx::NativeWindow parent, Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, diff --git a/chrome/browser/views/dialog_stubs_gtk.cc b/chrome/browser/views/dialog_stubs_gtk.cc index 45e7249..7c1b15d 100644 --- a/chrome/browser/views/dialog_stubs_gtk.cc +++ b/chrome/browser/views/dialog_stubs_gtk.cc @@ -6,6 +6,8 @@ // browser_dialogs.h that are currently unimplemented in GTK-views. #include "base/logging.h" +#include "chrome/browser/fonts_languages_window.h" +#include "chrome/browser/options_window.h" #include "chrome/browser/views/browser_dialogs.h" namespace browser { @@ -99,3 +101,14 @@ void ShowPageInfo(gfx::NativeView parent, } } // namespace browser + +void ShowOptionsWindow(OptionsPage page, + OptionsGroup highlight_group, + Profile* profile) { + NOTIMPLEMENTED(); +} +void ShowFontsLanguagesWindow(gfx::NativeWindow window, + FontsLanguagesPage page, + Profile* profile) { + NOTIMPLEMENTED(); +} diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 15f2795..d8803d4 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -966,12 +966,12 @@ void BrowserView::TabContentsFocused(TabContents* tab_contents) { contents_container_->TabContentsFocused(tab_contents); } -void BrowserView::ShowPageInfo(gfx::NativeView parent, - Profile* profile, +void BrowserView::ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history) { - browser::ShowPageInfo(parent, profile, url, ssl, show_history); + browser::ShowPageInfo(GetWindow()->GetNativeWindow(), profile, url, ssl, + show_history); } /////////////////////////////////////////////////////////////////////////////// diff --git a/chrome/browser/views/frame/browser_view.h b/chrome/browser/views/frame/browser_view.h index 1f64249..859beba 100644 --- a/chrome/browser/views/frame/browser_view.h +++ b/chrome/browser/views/frame/browser_view.h @@ -244,8 +244,7 @@ class BrowserView : public BrowserWindow, virtual void UserChangedTheme(); virtual int GetExtraRenderViewHeight() const; virtual void TabContentsFocused(TabContents* source); - virtual void ShowPageInfo(gfx::NativeView parent, - Profile* profile, + virtual void ShowPageInfo(Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, bool show_history); diff --git a/chrome/browser/views/page_info_window_view.cc b/chrome/browser/views/page_info_window_view.cc index 38e5696..4e3b020 100644 --- a/chrome/browser/views/page_info_window_view.cc +++ b/chrome/browser/views/page_info_window_view.cc @@ -51,7 +51,7 @@ class PageInfoWindowView : public views::View, public views::ButtonListener, public PageInfoModel::PageInfoModelObserver { public: - PageInfoWindowView(gfx::NativeView parent, + PageInfoWindowView(gfx::NativeWindow parent, Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, @@ -59,7 +59,7 @@ class PageInfoWindowView : public views::View, virtual ~PageInfoWindowView(); // This is the main initializer that creates the window. - virtual void Init(gfx::NativeView parent); + virtual void Init(gfx::NativeWindow parent); // views::View overrides: virtual gfx::Size GetPreferredSize(); @@ -153,7 +153,7 @@ int PageInfoWindowView::opened_window_count_ = 0; //////////////////////////////////////////////////////////////////////////////// // PageInfoWindowViews -PageInfoWindowView::PageInfoWindowView(gfx::NativeView parent, +PageInfoWindowView::PageInfoWindowView(gfx::NativeWindow parent, Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, @@ -169,11 +169,13 @@ PageInfoWindowView::~PageInfoWindowView() { opened_window_count_--; } -void PageInfoWindowView::Init(gfx::NativeView parent) { +void PageInfoWindowView::Init(gfx::NativeWindow parent) { +#if defined(OS_WIN) DWORD sys_color = ::GetSysColor(COLOR_3DFACE); SkColor color = SkColorSetRGB(GetRValue(sys_color), GetGValue(sys_color), GetBValue(sys_color)); set_background(views::Background::CreateSolidBackground(color)); +#endif LayoutSections(); @@ -288,9 +290,13 @@ void PageInfoWindowView::ButtonPressed(views::Button* sender) { void PageInfoWindowView::CalculateWindowBounds(gfx::Rect* bounds) { const int kDefaultOffset = 15; +#if defined(OS_WIN) gfx::Rect monitor_bounds(win_util::GetMonitorBoundsForRect(*bounds)); if (monitor_bounds.IsEmpty()) return; +#else + gfx::Rect monitor_bounds(0, 0, 1024, 768); +#endif // If necessary, move the window so it is visible on the screen. gfx::Rect adjusted_bounds = bounds->AdjustToFit(monitor_bounds); @@ -372,8 +378,12 @@ Section::Section(const std::wstring& title, title_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); AddChildView(title_label_); +#if defined(OS_WIN) separator_ = new views::Separator(); AddChildView(separator_); +#else + NOTIMPLEMENTED(); +#endif status_image_ = new views::ImageView(); status_image_->SetImage(state ? good_state_icon_ : bad_state_icon_); @@ -426,9 +436,13 @@ void Section::Layout() { gfx::Size size = title_label_->GetPreferredSize(); title_label_->SetBounds(x, y, size.width(), size.height()); x += size.width() + kHGapTitleToSeparator; +#if defined(OS_WIN) separator_->SetBounds(x + kHExtraSeparatorPadding, y, width() - x - 2 * kHExtraSeparatorPadding, size.height()); +#else + NOTIMPLEMENTED(); +#endif // Then the image, head-line and description. x = kHGapToBorder; @@ -454,7 +468,7 @@ void Section::Layout() { namespace browser { -void ShowPageInfo(gfx::NativeView parent, +void ShowPageInfo(gfx::NativeWindow parent, Profile* profile, const GURL& url, const NavigationEntry::SSLStatus& ssl, diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index b97a90a..fd5ff00 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -2080,6 +2080,7 @@ ['include', '^browser/views/info_bubble.h'], ['include', '^browser/views/location_bar_view.cc'], ['include', '^browser/views/location_bar_view.h'], + ['include', '^browser/views/page_info_window_view.cc'], # Not necessary unless you're trying to build ChromeOS+views. #['include', '^browser/views/panels/panel_scroller.cc'], #['include', '^browser/views/panels/panel_scroller.h'], @@ -2155,13 +2156,8 @@ ['include', '^browser/gtk/keyword_editor_view.h'], ['include', '^browser/gtk/list_store_favicon_loader.cc'], ['include', '^browser/gtk/list_store_favicon_loader.h'], - ['include', '^browser/gtk/options'], - ['include', '^browser/gtk/options/general_page_gtk.cc'], - ['include', '^browser/gtk/options/general_page_gtk.h'], ['include', '^browser/gtk/menu_gtk.cc'], ['include', '^browser/gtk/menu_gtk.h'], - ['include', '^browser/gtk/sad_tab_gtk.cc'], - ['include', '^browser/gtk/sad_tab_gtk.h'], # Other excluded stuff. ['exclude', '^browser/browser_theme_provider_gtk.cc'], |