summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 20:31:17 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-09 20:31:17 +0000
commit539785381fe1936a51d86717f2e4efdc2ca58f28 (patch)
tree0ef956fdd820aee02830134148c61f36eeb9f848
parenta5e8c6d4aa3dbe86823813bab9935557c3db1e38 (diff)
downloadchromium_src-539785381fe1936a51d86717f2e4efdc2ca58f28.zip
chromium_src-539785381fe1936a51d86717f2e4efdc2ca58f28.tar.gz
chromium_src-539785381fe1936a51d86717f2e4efdc2ca58f28.tar.bz2
Remove obsolete chromeos specific code
BUG=none TEST=none Review URL: http://codereview.chromium.org/10008058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131423 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_command_ids.h1
-rw-r--r--chrome/app/chrome_exe_main_gtk.cc4
-rw-r--r--chrome/browser/ui/browser.cc8
-rw-r--r--chrome/browser/ui/browser.h1
-rw-r--r--chrome/browser/ui/browser_window.h3
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.h1
-rw-r--r--chrome/browser/ui/cocoa/browser_window_cocoa.mm3
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc4
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.h1
-rw-r--r--chrome/browser/ui/gtk/gtk_util.cc4
-rw-r--r--chrome/browser/ui/gtk/gtk_util.h7
-rw-r--r--chrome/browser/ui/gtk/simple_message_box_gtk.cc4
-rw-r--r--chrome/browser/ui/panels/panel.cc4
-rw-r--r--chrome/browser/ui/panels/panel.h1
-rw-r--r--chrome/browser/ui/views/frame/browser_view.h1
-rw-r--r--chrome/test/base/test_browser_window.h1
-rw-r--r--printing/printed_document_gtk.cc4
-rw-r--r--ui/base/gtk/tooltip_window_gtk.cc96
-rw-r--r--ui/base/gtk/tooltip_window_gtk.h58
-rw-r--r--ui/ui.gyp2
20 files changed, 5 insertions, 203 deletions
diff --git a/chrome/app/chrome_command_ids.h b/chrome/app/chrome_command_ids.h
index 5eca7a3..952f812 100644
--- a/chrome/app/chrome_command_ids.h
+++ b/chrome/app/chrome_command_ids.h
@@ -139,7 +139,6 @@
#define IDC_FOCUS_NEXT_PANE 39004
#define IDC_FOCUS_PREVIOUS_PANE 39005
#define IDC_FOCUS_BOOKMARKS 39006
-#define IDC_FOCUS_CHROMEOS_STATUS 39007
// Show various bits of UI
#define IDC_OPEN_FILE 40000
diff --git a/chrome/app/chrome_exe_main_gtk.cc b/chrome/app/chrome_exe_main_gtk.cc
index b902e08..646fde0 100644
--- a/chrome/app/chrome_exe_main_gtk.cc
+++ b/chrome/app/chrome_exe_main_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -17,7 +17,7 @@ int ChromeMain(int argc, const char** argv);
int main(int argc, const char** argv) {
int return_code = ChromeMain(argc, argv);
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if defined(OS_LINUX)
// Launch a new instance if we're shutting down because we detected an
// upgrade in the persistent mode.
upgrade_util::RelaunchChromeBrowserWithNewCommandLineIfNeeded();
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 348013a..8cf4de6 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2183,11 +2183,6 @@ void Browser::FocusBookmarksToolbar() {
window_->FocusBookmarksToolbar();
}
-void Browser::FocusChromeOSStatus() {
- content::RecordAction(UserMetricsAction("FocusChromeOSStatus"));
- window_->FocusChromeOSStatus();
-}
-
void Browser::FocusNextPane() {
content::RecordAction(UserMetricsAction("FocusNextPane"));
window_->RotatePaneFocus(true);
@@ -3214,7 +3209,6 @@ void Browser::ExecuteCommandWithDisposition(
case IDC_FOCUS_SEARCH: FocusSearch(); break;
case IDC_FOCUS_MENU_BAR: FocusAppMenu(); break;
case IDC_FOCUS_BOOKMARKS: FocusBookmarksToolbar(); break;
- case IDC_FOCUS_CHROMEOS_STATUS: FocusChromeOSStatus(); break;
case IDC_FOCUS_NEXT_PANE: FocusNextPane(); break;
case IDC_FOCUS_PREVIOUS_PANE: FocusPreviousPane(); break;
@@ -4896,8 +4890,6 @@ void Browser::UpdateCommandsForFullscreenMode(bool is_fullscreen) {
IDC_FOCUS_PREVIOUS_PANE, main_not_fullscreen);
command_updater_.UpdateCommandEnabled(
IDC_FOCUS_BOOKMARKS, main_not_fullscreen);
- command_updater_.UpdateCommandEnabled(
- IDC_FOCUS_CHROMEOS_STATUS, main_not_fullscreen);
// Show various bits of UI
command_updater_.UpdateCommandEnabled(IDC_DEVELOPER_MENU, show_main_ui);
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 90c6fc5..54b9e86 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -632,7 +632,6 @@ class Browser : public TabHandlerDelegate,
void FocusSearch();
void FocusAppMenu();
void FocusBookmarksToolbar();
- void FocusChromeOSStatus();
void FocusNextPane();
void FocusPreviousPane();
diff --git a/chrome/browser/ui/browser_window.h b/chrome/browser/ui/browser_window.h
index 34c0b4d..82e40f1 100644
--- a/chrome/browser/ui/browser_window.h
+++ b/chrome/browser/ui/browser_window.h
@@ -158,9 +158,6 @@ class BrowserWindow : public BaseWindow {
// Focuses the bookmarks toolbar (for accessibility).
virtual void FocusBookmarksToolbar() = 0;
- // Focuses the Chrome OS status view (for accessibility).
- virtual void FocusChromeOSStatus() = 0;
-
// Moves keyboard focus to the next pane.
virtual void RotatePaneFocus(bool forwards) = 0;
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index f13d5b4..ef822e9 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -76,7 +76,6 @@ class BrowserWindowCocoa : public BrowserWindow,
virtual void FocusToolbar() OVERRIDE;
virtual void FocusAppMenu() OVERRIDE;
virtual void FocusBookmarksToolbar() OVERRIDE;
- virtual void FocusChromeOSStatus() OVERRIDE;
virtual void RotatePaneFocus(bool forwards) OVERRIDE;
virtual bool IsBookmarkBarVisible() const OVERRIDE;
virtual bool IsBookmarkBarAnimating() const OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index d837114..2e9ec16 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -363,9 +363,6 @@ void BrowserWindowCocoa::FocusBookmarksToolbar() {
// Not needed on the Mac.
}
-void BrowserWindowCocoa::FocusChromeOSStatus() {
- // Not needed on the Mac.
-}
bool BrowserWindowCocoa::IsBookmarkBarVisible() const {
return browser_->profile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar);
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 858bc7e..eb23212 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -986,10 +986,6 @@ void BrowserWindowGtk::FocusBookmarksToolbar() {
NOTIMPLEMENTED();
}
-void BrowserWindowGtk::FocusChromeOSStatus() {
- NOTIMPLEMENTED();
-}
-
void BrowserWindowGtk::RotatePaneFocus(bool forwards) {
NOTIMPLEMENTED();
}
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.h b/chrome/browser/ui/gtk/browser_window_gtk.h
index 0a1173b..e264133 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.h
+++ b/chrome/browser/ui/gtk/browser_window_gtk.h
@@ -118,7 +118,6 @@ class BrowserWindowGtk : public BrowserWindow,
virtual void FocusToolbar() OVERRIDE;
virtual void FocusAppMenu() OVERRIDE;
virtual void FocusBookmarksToolbar() OVERRIDE;
- virtual void FocusChromeOSStatus() OVERRIDE;
virtual void RotatePaneFocus(bool forwards) OVERRIDE;
virtual bool IsBookmarkBarVisible() const OVERRIDE;
virtual bool IsBookmarkBarAnimating() const OVERRIDE;
diff --git a/chrome/browser/ui/gtk/gtk_util.cc b/chrome/browser/ui/gtk/gtk_util.cc
index b1ec590..ac70cec 100644
--- a/chrome/browser/ui/gtk/gtk_util.cc
+++ b/chrome/browser/ui/gtk/gtk_util.cc
@@ -1065,10 +1065,6 @@ void PresentWindow(GtkWidget* window, int timestamp) {
gtk_window_present(GTK_WINDOW(window));
}
-GtkWindow* GetDialogWindow(GtkWidget* dialog) {
- return GTK_WINDOW(dialog);
-}
-
gfx::Rect GetDialogBounds(GtkWidget* dialog) {
gint x = 0, y = 0, width = 1, height = 1;
gtk_window_get_position(GTK_WINDOW(dialog), &x, &y);
diff --git a/chrome/browser/ui/gtk/gtk_util.h b/chrome/browser/ui/gtk/gtk_util.h
index da11470..feb5504 100644
--- a/chrome/browser/ui/gtk/gtk_util.h
+++ b/chrome/browser/ui/gtk/gtk_util.h
@@ -293,14 +293,9 @@ void ShowDialogWithMinLocalizedWidth(GtkWidget* dialog,
int width_id);
// Wrapper to present a window. On Linux, it just calls gtk_window_present or
-// gtk_window_present_with_time for non-zero timestamp. For ChromeOS, it first
-// finds the host window of the dialog contents and then present it.
+// gtk_window_present_with_time for non-zero timestamp.
void PresentWindow(GtkWidget* window, int timestamp);
-// Get real window for given dialog. On ChromeOS, this gives the native dialog
-// host window. On Linux, it merely returns the passed in dialog.
-GtkWindow* GetDialogWindow(GtkWidget* dialog);
-
// Gets dialog window bounds.
gfx::Rect GetDialogBounds(GtkWidget* dialog);
diff --git a/chrome/browser/ui/gtk/simple_message_box_gtk.cc b/chrome/browser/ui/gtk/simple_message_box_gtk.cc
index 42ff81a..23d4578 100644
--- a/chrome/browser/ui/gtk/simple_message_box_gtk.cc
+++ b/chrome/browser/ui/gtk/simple_message_box_gtk.cc
@@ -13,9 +13,7 @@ namespace {
void SetDialogTitle(GtkWidget* dialog, const string16& title) {
gtk_window_set_title(GTK_WINDOW(dialog), UTF16ToUTF8(title).c_str());
- // The following code requires the dialog to be realized. However, we host
- // dialog's content in a Chrome window without really realize the dialog
- // on ChromeOS. Thus, skip the following code for ChromeOS.
+ // The following code requires the dialog to be realized.
gtk_widget_realize(dialog);
// Make sure it's big enough to show the title.
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 86961f0..2585341 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -451,10 +451,6 @@ void Panel::FocusBookmarksToolbar() {
NOTIMPLEMENTED();
}
-void Panel::FocusChromeOSStatus() {
- NOTIMPLEMENTED();
-}
-
void Panel::RotatePaneFocus(bool forwards) {
NOTIMPLEMENTED();
}
diff --git a/chrome/browser/ui/panels/panel.h b/chrome/browser/ui/panels/panel.h
index f347dad..c9cee21 100644
--- a/chrome/browser/ui/panels/panel.h
+++ b/chrome/browser/ui/panels/panel.h
@@ -131,7 +131,6 @@ class Panel : public BrowserWindow,
virtual void FocusToolbar() OVERRIDE;
virtual void FocusAppMenu() OVERRIDE;
virtual void FocusBookmarksToolbar() OVERRIDE;
- virtual void FocusChromeOSStatus() OVERRIDE;
virtual void RotatePaneFocus(bool forwards) OVERRIDE;
virtual bool IsBookmarkBarVisible() const OVERRIDE;
virtual bool IsBookmarkBarAnimating() const OVERRIDE;
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index ced6a63..f66d80b 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -262,7 +262,6 @@ class BrowserView : public BrowserWindow,
virtual void FocusToolbar() OVERRIDE;
virtual void FocusAppMenu() OVERRIDE;
virtual void FocusBookmarksToolbar() OVERRIDE;
- virtual void FocusChromeOSStatus() OVERRIDE {}
virtual void RotatePaneFocus(bool forwards) OVERRIDE;
virtual void DestroyBrowser() OVERRIDE;
virtual bool IsBookmarkBarVisible() const OVERRIDE;
diff --git a/chrome/test/base/test_browser_window.h b/chrome/test/base/test_browser_window.h
index f9f1145..9970145 100644
--- a/chrome/test/base/test_browser_window.h
+++ b/chrome/test/base/test_browser_window.h
@@ -64,7 +64,6 @@ class TestBrowserWindow : public BrowserWindow {
virtual void FocusToolbar() OVERRIDE {}
virtual void FocusAppMenu() OVERRIDE {}
virtual void FocusBookmarksToolbar() OVERRIDE {}
- virtual void FocusChromeOSStatus() OVERRIDE {}
virtual void RotatePaneFocus(bool forwards) OVERRIDE {}
virtual void ShowAppMenu() OVERRIDE {}
virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
diff --git a/printing/printed_document_gtk.cc b/printing/printed_document_gtk.cc
index 7a1fb32..0970b25 100644
--- a/printing/printed_document_gtk.cc
+++ b/printing/printed_document_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -23,7 +23,6 @@ void PrintedDocument::RenderPrintedPage(
DCHECK(context);
-#if !defined(OS_CHROMEOS)
{
base::AutoLock lock(lock_);
if (page.page_number() - 1 == mutable_.first_page) {
@@ -31,7 +30,6 @@ void PrintedDocument::RenderPrintedPage(
page.metafile());
}
}
-#endif // !defined(OS_CHROMEOS)
}
} // namespace printing
diff --git a/ui/base/gtk/tooltip_window_gtk.cc b/ui/base/gtk/tooltip_window_gtk.cc
deleted file mode 100644
index 2ef65ee..0000000
--- a/ui/base/gtk/tooltip_window_gtk.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) 2011 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 "ui/base/gtk/tooltip_window_gtk.h"
-
-#include <gtk/gtk.h>
-
-#include "base/utf_string_conversions.h"
-
-namespace ui {
-
-TooltipWindowGtk::TooltipWindowGtk(GtkWidget* widget)
- : host_(widget),
- window_(NULL),
- alignment_(NULL),
- label_(NULL) {
- Init();
-}
-
-TooltipWindowGtk::~TooltipWindowGtk() {
- if (window_)
- gtk_widget_destroy(window_);
-}
-
-void TooltipWindowGtk::SetTooltipText(const string16& text) {
- gtk_label_set_text(label(), UTF16ToUTF8(text).c_str());
-}
-
-GtkLabel* TooltipWindowGtk::label() {
- return GTK_LABEL(label_);
-}
-
-void TooltipWindowGtk::Init() {
- // Creates and setup tooltip window.
- window_ = gtk_window_new(GTK_WINDOW_POPUP);
- gtk_window_set_type_hint(GTK_WINDOW(window_), GDK_WINDOW_TYPE_HINT_TOOLTIP);
- gtk_widget_set_app_paintable(window_, TRUE);
- gtk_window_set_resizable(GTK_WINDOW(window_), FALSE);
- gtk_widget_set_name(window_, "gtk-tooltip");
-
- GdkColormap* rgba_colormap =
- gdk_screen_get_rgba_colormap(gdk_screen_get_default());
- if (rgba_colormap)
- gtk_widget_set_colormap(window_, rgba_colormap);
-
- g_signal_connect(G_OBJECT(window_), "expose-event",
- G_CALLBACK(&OnPaintThunk), this);
- g_signal_connect(G_OBJECT(window_), "style-set",
- G_CALLBACK(&OnStyleSetThunk), this);
-
- alignment_ = gtk_alignment_new(0.5, 0.5, 1.0, 1.0);
- gtk_container_add(GTK_CONTAINER(window_), alignment_);
- gtk_widget_show(alignment_);
-
- label_ = gtk_label_new("");
- gtk_label_set_line_wrap(GTK_LABEL(label_), TRUE);
- gtk_container_add(GTK_CONTAINER(alignment_), label_);
- gtk_widget_show(label_);
-
- // Associates the tooltip window with given widget
- gtk_widget_set_tooltip_window(host_, GTK_WINDOW(window_));
-}
-
-// Paints our customized tooltip window.
-gboolean TooltipWindowGtk::OnPaint(GtkWidget* widget, GdkEventExpose* event) {
- GtkAllocation allocation;
- gtk_widget_get_allocation(widget, &allocation);
- gtk_paint_flat_box(gtk_widget_get_style(widget),
- gtk_widget_get_window(widget),
- GTK_STATE_NORMAL,
- GTK_SHADOW_OUT,
- NULL,
- widget,
- "tooltip",
- 0, 0,
- allocation.width,
- allocation.height);
-
- return FALSE;
-}
-
-// Style change handler.
-void TooltipWindowGtk::OnStyleSet(GtkWidget* widget,
- GtkStyle* previous_style) {
- GtkStyle* style = gtk_widget_get_style(widget);
- gtk_alignment_set_padding(GTK_ALIGNMENT(alignment_),
- style->ythickness,
- style->ythickness,
- style->xthickness,
- style->xthickness);
-
- gtk_widget_queue_draw(widget);
-}
-
-} // namespace ui
diff --git a/ui/base/gtk/tooltip_window_gtk.h b/ui/base/gtk/tooltip_window_gtk.h
deleted file mode 100644
index 8183fe9..0000000
--- a/ui/base/gtk/tooltip_window_gtk.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (c) 2011 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 UI_BASE_GTK_TOOLTIP_WINDOW_GTK_H_
-#define UI_BASE_GTK_TOOLTIP_WINDOW_GTK_H_
-#pragma once
-
-#include <string>
-
-#include "base/string16.h"
-#include "ui/base/glib/glib_integers.h"
-#include "ui/base/gtk/gtk_signal.h"
-#include "ui/base/ui_export.h"
-
-typedef struct _GdkEventExpose GdkEventExpose;
-typedef struct _GtkLabel GtkLabel;
-typedef struct _GtkWidget GtkWidget;
-typedef struct _GtkStyle GtkStyle;
-
-namespace ui {
-
-// TooltipWindowGtk provides a customized tooltip window and gives us a
-// chance to apply RGBA colormap on it. This enables the GTK theme engine to
-// draw tooltip with nice shadow and rounded corner on ChromeOS.
-class UI_EXPORT TooltipWindowGtk {
- public:
- explicit TooltipWindowGtk(GtkWidget* widget);
- ~TooltipWindowGtk();
-
- // Sets tooltip text to display.
- void SetTooltipText(const string16& text);
-
- GtkLabel* label();
-
- protected:
- CHROMEGTK_CALLBACK_1(TooltipWindowGtk, gboolean, OnPaint, GdkEventExpose*);
- CHROMEGTK_CALLBACK_1(TooltipWindowGtk, void, OnStyleSet, GtkStyle*);
-
- private:
- void Init();
-
- // Underlying widget of this tooltip window.
- GtkWidget* host_;
-
- // GtkWindow of this tooltip window.
- GtkWidget* window_;
-
- // The alignment and label widgets contained of the tooltip window.
- GtkWidget* alignment_;
- GtkWidget* label_;
-
- DISALLOW_COPY_AND_ASSIGN(TooltipWindowGtk);
-};
-
-} // namespace ui
-
-#endif // UI_BASE_GTK_TOOLTIP_WINDOW_GTK_H_
diff --git a/ui/ui.gyp b/ui/ui.gyp
index 538265d..3dc7f14 100644
--- a/ui/ui.gyp
+++ b/ui/ui.gyp
@@ -166,8 +166,6 @@
'base/gtk/scoped_gobject.h',
'base/gtk/scoped_region.cc',
'base/gtk/scoped_region.h',
- 'base/gtk/tooltip_window_gtk.cc',
- 'base/gtk/tooltip_window_gtk.h',
'base/hit_test.h',
'base/javascript_message_type.h',
'base/keycodes/keyboard_code_conversion.cc',