diff options
-rw-r--r-- | chrome/browser/views/location_bar_view.cc | 13 | ||||
-rw-r--r-- | chrome/browser/views/tabs/native_view_photobooth_gtk.cc | 34 | ||||
-rw-r--r-- | chrome/browser/views/tabs/native_view_photobooth_gtk.h | 29 | ||||
-rw-r--r-- | chrome/chrome.gyp | 5 | ||||
-rw-r--r-- | views/controls/native/native_view_host_gtk.cc | 4 |
5 files changed, 85 insertions, 0 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index df195c4..0aa957f 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -4,6 +4,8 @@ #include "chrome/browser/views/location_bar_view.h" +#include "build/build_config.h" + #include "app/gfx/canvas.h" #include "app/gfx/favicon_size.h" #include "app/l10n_util.h" @@ -40,6 +42,9 @@ #include "app/win_util.h" #include "chrome/browser/views/first_run_bubble.h" #include "chrome/browser/views/page_info_window.h" +#else +#include "base/gfx/gtk_util.h" +#include "chrome/browser/gtk/location_bar_view_gtk.h" #endif using views::View; @@ -51,6 +56,14 @@ const SkColor LocationBarView::kBackgroundColorByLevel[] = { SkColorSetRGB(255, 255, 255), // SecurityLevel NORMAL: White. SkColorSetRGB(255, 255, 255), // SecurityLevel INSECURE: White. }; +#if defined(OS_LINUX) +// static +const GdkColor LocationBarViewGtk::kBackgroundColorByLevel[3] = { + GDK_COLOR_RGB(255, 245, 195), // SecurityLevel SECURE: Yellow. + GDK_COLOR_RGB(255, 255, 255), // SecurityLevel NORMAL: White. + GDK_COLOR_RGB(255, 255, 255), // SecurityLevel INSECURE: White. +}; +#endif // Padding on the right and left of the entry field. static const int kEntryPadding = 3; diff --git a/chrome/browser/views/tabs/native_view_photobooth_gtk.cc b/chrome/browser/views/tabs/native_view_photobooth_gtk.cc new file mode 100644 index 0000000..83077aa --- /dev/null +++ b/chrome/browser/views/tabs/native_view_photobooth_gtk.cc @@ -0,0 +1,34 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/views/tabs/native_view_photobooth_gtk.h" + +#include "app/gfx/canvas.h" +#include "base/logging.h" + +/////////////////////////////////////////////////////////////////////////////// +// NativeViewPhotoboothGtk, public: + +// static +NativeViewPhotobooth* NativeViewPhotobooth::Create( + gfx::NativeView initial_view) { + return new NativeViewPhotoboothGtk(initial_view); +} + +NativeViewPhotoboothGtk::NativeViewPhotoboothGtk( + gfx::NativeView initial_view) { +} + +NativeViewPhotoboothGtk::~NativeViewPhotoboothGtk() { +} + +void NativeViewPhotoboothGtk::Replace(gfx::NativeView new_view) { + NOTIMPLEMENTED(); +} + +void NativeViewPhotoboothGtk::PaintScreenshotIntoCanvas( + gfx::Canvas* canvas, + const gfx::Rect& target_bounds) { + NOTIMPLEMENTED(); +} diff --git a/chrome/browser/views/tabs/native_view_photobooth_gtk.h b/chrome/browser/views/tabs/native_view_photobooth_gtk.h new file mode 100644 index 0000000..6082f52 --- /dev/null +++ b/chrome/browser/views/tabs/native_view_photobooth_gtk.h @@ -0,0 +1,29 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_VIEWS_TABS_NATIVE_VIEW_PHOTOBOOTH_GTK_H_ +#define CHROME_BROWSER_VIEWS_TABS_NATIVE_VIEW_PHOTOBOOTH_GTK_H_ + +#include "chrome/browser/views/tabs/native_view_photobooth.h" + +class NativeViewPhotoboothGtk : public NativeViewPhotobooth { + public: + explicit NativeViewPhotoboothGtk(gfx::NativeView new_view); + + // Destroys the photo booth window. + virtual ~NativeViewPhotoboothGtk(); + + // Replaces the view in the photo booth with the specified one. + virtual void Replace(gfx::NativeView new_view); + + // Paints the current display image of the window into |canvas|, clipped to + // |target_bounds|. + virtual void PaintScreenshotIntoCanvas(gfx::Canvas* canvas, + const gfx::Rect& target_bounds); + + private: + DISALLOW_COPY_AND_ASSIGN(NativeViewPhotoboothGtk); +}; + +#endif // #ifndef CHROME_BROWSER_VIEWS_TABS_NATIVE_VIEW_PHOTOBOOTH_GTK_H_ diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index a0cf91a..2fc087f 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1536,6 +1536,8 @@ 'browser/views/tabs/dragged_tab_view.cc', 'browser/views/tabs/dragged_tab_view.h', 'browser/views/tabs/native_view_photobooth.h', + 'browser/views/tabs/native_view_photobooth_gtk.cc', + 'browser/views/tabs/native_view_photobooth_gtk.h', 'browser/views/tabs/native_view_photobooth_win.cc', 'browser/views/tabs/native_view_photobooth_win.h', 'browser/views/tabs/tab.cc', @@ -1774,6 +1776,9 @@ ['include', '^browser/views/tabs/dragged_tab_controller.h'], ['include', '^browser/views/tabs/dragged_tab_view.cc'], ['include', '^browser/views/tabs/dragged_tab_view.h'], + ['include', '^browser/views/tabs/native_view_photobooth.h'], + ['include', '^browser/views/tabs/native_view_photobooth_gtk.cc'], + ['include', '^browser/views/tabs/native_view_photobooth_gtk.h'], ['include', '^browser/views/tabs/tab.cc'], ['include', '^browser/views/tabs/tab.h'], ['include', '^browser/views/tabs/tab_renderer.cc'], diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc index 0c61843..96a1291 100644 --- a/views/controls/native/native_view_host_gtk.cc +++ b/views/controls/native/native_view_host_gtk.cc @@ -130,6 +130,10 @@ void NativeViewHostGtk::InstallClip(int x, int y, int w, int h) { installed_clip_ = true; } +bool NativeViewHostGtk::HasInstalledClip() { + return installed_clip_; +} + void NativeViewHostGtk::UninstallClip() { gtk_widget_shape_combine_mask(host_->native_view(), NULL, 0, 0); installed_clip_ = false; |