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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10038040: In Windows8 metro mode prevent moving/sizing/maximizing of the chrome browser frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_view.cc
===================================================================
--- chrome/browser/ui/views/frame/browser_view.cc (revision 132012)
+++ chrome/browser/ui/views/frame/browser_view.cc (working copy)
@@ -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 @@
#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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698