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

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: Add constrained window flag 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') | ui/aura/window.h » ('J')
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/window.h"
7 #include "ui/views/widget/native_widget_aura.h" 8 #include "ui/views/widget/native_widget_aura.h"
8 9
9 class NativeConstrainedWindowAura : public NativeConstrainedWindow, 10 class NativeConstrainedWindowAura : public NativeConstrainedWindow,
10 public views::NativeWidgetAura { 11 public views::NativeWidgetAura {
11 public: 12 public:
12 explicit NativeConstrainedWindowAura( 13 explicit NativeConstrainedWindowAura(
13 NativeConstrainedWindowDelegate* delegate) 14 NativeConstrainedWindowDelegate* delegate)
14 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()), 15 : views::NativeWidgetAura(delegate->AsNativeWidgetDelegate()),
15 delegate_(delegate) { 16 delegate_(delegate) {
17 GetNativeWindow()->set_is_constrained_window(true);
16 } 18 }
17 19
18 virtual ~NativeConstrainedWindowAura() { 20 virtual ~NativeConstrainedWindowAura() {
19 } 21 }
20 22
21 private: 23 private:
22 // Overridden from NativeConstrainedWindow: 24 // Overridden from NativeConstrainedWindow:
23 virtual views::NativeWidget* AsNativeWidget() OVERRIDE { 25 virtual views::NativeWidget* AsNativeWidget() OVERRIDE {
24 return this; 26 return this;
25 } 27 }
(...skipping 10 matching lines...) Expand all
36 }; 38 };
37 39
38 //////////////////////////////////////////////////////////////////////////////// 40 ////////////////////////////////////////////////////////////////////////////////
39 // NativeConstrainedWindow, public: 41 // NativeConstrainedWindow, public:
40 42
41 // static 43 // static
42 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow( 44 NativeConstrainedWindow* NativeConstrainedWindow::CreateNativeConstrainedWindow(
43 NativeConstrainedWindowDelegate* delegate) { 45 NativeConstrainedWindowDelegate* delegate) {
44 return new NativeConstrainedWindowAura(delegate); 46 return new NativeConstrainedWindowAura(delegate);
45 } 47 }
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_view_aura.cc » ('j') | ui/aura/window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698