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

Unified Diff: chrome/browser/ui/views/native_constrained_window_win.cc

Issue 12045037: Refactor modality-specific behavior from ConstrainedWindowViews to WebContentsModalDialogManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Android link error Created 7 years, 10 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
Index: chrome/browser/ui/views/native_constrained_window_win.cc
diff --git a/chrome/browser/ui/views/native_constrained_window_win.cc b/chrome/browser/ui/views/native_constrained_window_win.cc
deleted file mode 100644
index 931f971d60143587b54d8d11b0218048bb33a31a..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/native_constrained_window_win.cc
+++ /dev/null
@@ -1,60 +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 "chrome/browser/ui/views/constrained_window_views.h"
-
-#include "ui/views/widget/native_widget_win.h"
-
-namespace {
-bool IsNonClientHitTestCode(UINT hittest) {
- return hittest != HTCLIENT && hittest != HTNOWHERE && hittest != HTCLOSE;
-}
-}
-
-class NativeConstrainedWindowWin : public NativeConstrainedWindow,
- public views::NativeWidgetWin {
- public:
- explicit NativeConstrainedWindowWin(NativeConstrainedWindowDelegate* delegate)
- : views::NativeWidgetWin(delegate->AsNativeWidgetDelegate()),
- delegate_(delegate) {
- }
-
- virtual ~NativeConstrainedWindowWin() {
- }
-
- private:
- // Overridden from NativeConstrainedWindow:
- virtual views::NativeWidget* AsNativeWidget() OVERRIDE {
- return this;
- }
-
- // Overridden from views::NativeWidgetWin:
- virtual void OnFinalMessage(HWND window) OVERRIDE {
- delegate_->OnNativeConstrainedWindowDestroyed();
- NativeWidgetWin::OnFinalMessage(window);
- }
- virtual bool PreHandleMSG(UINT message,
- WPARAM w_param,
- LPARAM l_param,
- LRESULT* result) OVERRIDE {
- if (message == WM_MOUSEACTIVATE &&
- IsNonClientHitTestCode(static_cast<UINT>(LOWORD(l_param)))) {
- delegate_->OnNativeConstrainedWindowMouseActivate();
- }
- return false;
- }
-
- NativeConstrainedWindowDelegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(NativeConstrainedWindowWin);
-};
-
-////////////////////////////////////////////////////////////////////////////////
-// NativeConstrainedWindow, public:
-
-// static
-NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow(
- NativeConstrainedWindowDelegate* delegate) {
- return new NativeConstrainedWindowWin(delegate);
-}
« no previous file with comments | « chrome/browser/ui/views/native_constrained_window_aura.cc ('k') | chrome/browser/ui/views/ssl_client_certificate_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698