summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 18:09:47 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-13 18:09:47 +0000
commit7a9323e0b107abda87ecc62dba990ea558b7df5c (patch)
treeea51dec33b6d2a0cb0fd076d93204c07226223d2
parentbbecbdea26ef28d075bfe909b828adc6ed525306 (diff)
downloadchromium_src-7a9323e0b107abda87ecc62dba990ea558b7df5c.zip
chromium_src-7a9323e0b107abda87ecc62dba990ea558b7df5c.tar.gz
chromium_src-7a9323e0b107abda87ecc62dba990ea558b7df5c.tar.bz2
In Windows8 metro mode prevent moving/sizing/maximizing of the chrome browser frame.
BUG=118641 Review URL: https://chromiumcodereview.appspot.com/10038040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132214 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index bc6e667..05b1cc2 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -110,6 +110,7 @@
#include "chrome/browser/ui/views/ash/launcher/launcher_updater.h"
#include "chrome/browser/ui/views/ash/window_positioner.h"
#elif defined(OS_WIN)
+#include "base/win/metro.h"
#include "chrome/browser/aeropeek_manager.h"
#include "chrome/browser/jumplist_win.h"
#include "ui/views/widget/native_widget_win.h"
@@ -1522,6 +1523,17 @@ bool BrowserView::ExecuteWindowsCommand(int command_id) {
#if defined(OS_WIN) && !defined(USE_AURA)
if (command_id == IDC_DEBUG_FRAME_TOGGLE)
GetWidget()->DebugToggleFrameType();
+
+ // In Windows 8 metro mode prevent sizing and moving.
+ if (base::win::GetMetroModule()) {
+ // Windows uses the 4 lower order bits of |notification_code| for type-
+ // specific information so we must exclude this when comparing.
+ static const int sc_mask = 0xFFF0;
+ if (((command_id & sc_mask) == SC_MOVE) ||
+ ((command_id & sc_mask) == SC_SIZE) ||
+ ((command_id & sc_mask) == SC_MAXIMIZE))
+ return true;
+ }
#endif
// Translate WM_APPCOMMAND command ids into a command id that the browser
// knows how to handle.