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

Side by Side Diff: chrome/browser/ui/views/native_constrained_window_aura.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/constrained_window_views.h"
6
7 #include "ui/aura/client/aura_constants.h"
8 #include "ui/aura/window.h"
9 #include "ui/views/widget/native_widget_aura.h"
10
11 class NativeConstrainedWindowAura : public NativeConstrainedWindow,
12 public views::NativeWidgetAura {
13 public:
14 explicit NativeConstrainedWindowAura(
15 NativeConstrainedWindowDelegate* delegate)
16 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()),
17 delegate_(delegate) {
18 GetNativeWindow()->SetProperty(aura::client::kConstrainedWindowKey, true);
19 }
20
21 virtual ~NativeConstrainedWindowAura() {
22 }
23
24 private:
25 // Overridden from NativeConstrainedWindow:
26 virtual views::NativeWidget* AsNativeWidget() OVERRIDE {
27 return this;
28 }
29
30 // Overridden from views::NativeWidgetAura:
31 virtual void OnWindowDestroyed() OVERRIDE {
32 delegate_->OnNativeConstrainedWindowDestroyed();
33 views::NativeWidgetAura::OnWindowDestroyed();
34 }
35
36 NativeConstrainedWindowDelegate* delegate_;
37
38 DISALLOW_COPY_AND_ASSIGN(NativeConstrainedWindowAura);
39 };
40
41 ////////////////////////////////////////////////////////////////////////////////
42 // NativeConstrainedWindow, public:
43
44 // static
45 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow(
46 NativeConstrainedWindowDelegate* delegate) {
47 return new NativeConstrainedWindowAura(delegate);
48 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_prompt_views.cc ('k') | chrome/browser/ui/views/native_constrained_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698