summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/browser_dialogs.h2
-rw-r--r--chrome/browser/views/dialog_stubs_gtk.cc13
-rw-r--r--chrome/browser/views/frame/browser_view.cc6
-rw-r--r--chrome/browser/views/frame/browser_view.h3
-rw-r--r--chrome/browser/views/page_info_window_view.cc24
5 files changed, 37 insertions, 11 deletions
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,