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

Side by Side Diff: chrome/browser/ui/views/native_constrained_window_aura.cc

Issue 10905290: Keep a web dialog window centered over the content area (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better. Created 8 years, 3 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
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/constrained_window_views.h" 5 #include "chrome/browser/ui/views/constrained_window_views.h"
6 6
7 #include "ui/aura/client/aura_constants.h"
8 #include "ui/aura/window.h"
7 #include "ui/views/widget/native_widget_aura.h" 9 #include "ui/views/widget/native_widget_aura.h"
8 10
9 class NativeConstrainedWindowAura : public NativeConstrainedWindow, 11 class NativeConstrainedWindowAura : public NativeConstrainedWindow,
10 public views::NativeWidgetAura { 12 public views::NativeWidgetAura {
11 public: 13 public:
12 explicit NativeConstrainedWindowAura( 14 explicit NativeConstrainedWindowAura(
13 NativeConstrainedWindowDelegate* delegate) 15 NativeConstrainedWindowDelegate* delegate)
14 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), 16 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()),
15 delegate_(delegate) { 17 delegate_(delegate) {
18 GetNativeWindow()->SetProperty(aura::client::kConstrainedWindowKey, true);
16 } 19 }
17 20
18 virtual ~NativeConstrainedWindowAura() { 21 virtual ~NativeConstrainedWindowAura() {
19 } 22 }
20 23
21 private: 24 private:
22 // Overridden from NativeConstrainedWindow: 25 // Overridden from NativeConstrainedWindow:
23 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { 26 virtual views::NativeWidget* AsNativeWidget() OVERRIDE {
24 return this; 27 return this;
25 } 28 }
(...skipping 10 matching lines...) Expand all
36 }; 39 };
37 40
38 //////////////////////////////////////////////////////////////////////////////// 41 ////////////////////////////////////////////////////////////////////////////////
39 // NativeConstrainedWindow, public: 42 // NativeConstrainedWindow, public:
40 43
41 // static 44 // static
42 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( 45 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow(
43 NativeConstrainedWindowDelegate* delegate) { 46 NativeConstrainedWindowDelegate* delegate) {
44 return new NativeConstrainedWindowAura(delegate); 47 return new NativeConstrainedWindowAura(delegate);
45 } 48 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698