Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2172)

Unified Diff: chrome/browser/chromeos/frame/layout_mode_button.cc

Issue 9664072: Removing WmIpc and related files from ChromeOS (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Copyright Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/frame/browser_view.cc ('k') | chrome/browser/chromeos/frame/panel_browser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/frame/layout_mode_button.cc
diff --git a/chrome/browser/chromeos/frame/layout_mode_button.cc b/chrome/browser/chromeos/frame/layout_mode_button.cc
index df95257cf2e2f8487c375540d6a3650bc4079267..17b045a4a97688d67870c273aad82ca0f2b97e54 100644
--- a/chrome/browser/chromeos/frame/layout_mode_button.cc
+++ b/chrome/browser/chromeos/frame/layout_mode_button.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,10 +17,6 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/views/widget/widget.h"
-#if defined(TOOLKIT_USES_GTK)
-#include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h"
-#endif
-
namespace {
const int kHorizontalPaddingPixels = 2;
} // namespace
@@ -56,57 +52,15 @@ void LayoutModeButton::Observe(int type,
}
void LayoutModeButton::Init() {
-#if defined(TOOLKIT_USES_GTK)
- WmIpc* wm_ipc = WmIpc::instance();
- registrar_.Add(this,
- chrome::NOTIFICATION_LAYOUT_MODE_CHANGED,
- content::Source<WmIpc>(wm_ipc));
-#endif
UpdateForCurrentLayoutMode();
}
void LayoutModeButton::ButtonPressed(views::Button* sender,
const views::Event& event) {
DCHECK_EQ(sender, this);
-#if defined(TOOLKIT_USES_GTK)
- WmIpc* wm_ipc = WmIpc::instance();
- const WmIpcLayoutMode mode = wm_ipc->layout_mode();
-
- WmIpc::Message message(WM_IPC_MESSAGE_WM_SET_LAYOUT_MODE);
- switch (mode) {
- case WM_IPC_LAYOUT_MAXIMIZED:
- message.set_param(0, WM_IPC_LAYOUT_OVERLAPPING);
- break;
- case WM_IPC_LAYOUT_OVERLAPPING:
- message.set_param(0, WM_IPC_LAYOUT_MAXIMIZED);
- break;
- default:
- DLOG(WARNING) << "Unknown layout mode " << mode;
- message.set_param(0, WM_IPC_LAYOUT_MAXIMIZED);
- }
- wm_ipc->SendMessage(message);
-#endif
}
void LayoutModeButton::UpdateForCurrentLayoutMode() {
-#if defined(TOOLKIT_USES_GTK)
- const WmIpcLayoutMode mode = WmIpc::instance()->layout_mode();
- ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- switch (mode) {
- case WM_IPC_LAYOUT_MAXIMIZED:
- SetImage(BS_NORMAL, rb.GetBitmapNamed(IDR_STATUSBAR_WINDOW_RESTORE));
- SetTooltipText(
- l10n_util::GetStringUTF16(IDS_STATUSBAR_WINDOW_RESTORE_TOOLTIP));
- break;
- case WM_IPC_LAYOUT_OVERLAPPING:
- SetImage(BS_NORMAL, rb.GetBitmapNamed(IDR_STATUSBAR_WINDOW_MAXIMIZE));
- SetTooltipText(
- l10n_util::GetStringUTF16(IDS_STATUSBAR_WINDOW_MAXIMIZE_TOOLTIP));
- break;
- default:
- DLOG(WARNING) << "Unknown layout mode " << mode;
- }
-#endif
}
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/frame/browser_view.cc ('k') | chrome/browser/chromeos/frame/panel_browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698