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

Side by Side Diff: chrome/browser/ui/views/constrained_window_views.h

Issue 11421164: Migrate CollectedCookiesViews to Chrome style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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
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 #ifndef CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/constrained_window.h" 9 #include "chrome/browser/ui/constrained_window.h"
10 #include "content/public/browser/notification_observer.h" 10 #include "content/public/browser/notification_observer.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // A ConstrainedWindow implementation that implements a Constrained Window as 57 // A ConstrainedWindow implementation that implements a Constrained Window as
58 // a child HWND with a custom window frame. The ConstrainedWindowViews owns 58 // a child HWND with a custom window frame. The ConstrainedWindowViews owns
59 // itself and will be deleted soon after being closed. 59 // itself and will be deleted soon after being closed.
60 // 60 //
61 class ConstrainedWindowViews : public views::Widget, 61 class ConstrainedWindowViews : public views::Widget,
62 public ConstrainedWindow, 62 public ConstrainedWindow,
63 public NativeConstrainedWindowDelegate, 63 public NativeConstrainedWindowDelegate,
64 public content::WebContentsObserver, 64 public content::WebContentsObserver,
65 public content::NotificationObserver { 65 public content::NotificationObserver {
66 public: 66 public:
67 // Types of insets to use with chrome style frame. 67 // Types of layout to provide on the chrome style frame.
68 enum ChromeStyleClientInsets { 68 enum ChromeStyleFrameLayout {
69 DEFAULT_INSETS, 69 FRAME_LAYOUT_FULL,
70 NO_INSETS, 70 FRAME_LAYOUT_HEADER_ONLY,
71 FRAME_LAYOUT_NONE,
71 }; 72 };
72 73
73 ConstrainedWindowViews(content::WebContents* web_contents, 74 ConstrainedWindowViews(content::WebContents* web_contents,
74 views::WidgetDelegate* widget_delegate, 75 views::WidgetDelegate* widget_delegate,
75 bool enable_chrome_style, 76 bool enable_chrome_style,
76 ChromeStyleClientInsets chrome_style_client_insets); 77 ChromeStyleFrameLayout chrome_style_frame_layout);
77 virtual ~ConstrainedWindowViews(); 78 virtual ~ConstrainedWindowViews();
78 79
79 // Returns the WebContents that constrains this Constrained Window. 80 // Returns the WebContents that constrains this Constrained Window.
80 content::WebContents* owner() const { return web_contents_; } 81 content::WebContents* owner() const { return web_contents_; }
81 82
82 // Overridden from ConstrainedWindow: 83 // Overridden from ConstrainedWindow:
83 virtual void ShowConstrainedWindow() OVERRIDE; 84 virtual void ShowConstrainedWindow() OVERRIDE;
84 virtual void CloseConstrainedWindow() OVERRIDE; 85 virtual void CloseConstrainedWindow() OVERRIDE;
85 virtual void FocusConstrainedWindow() OVERRIDE; 86 virtual void FocusConstrainedWindow() OVERRIDE;
86 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE; 87 virtual gfx::NativeWindow GetNativeWindow() OVERRIDE;
(...skipping 29 matching lines...) Expand all
116 // Set the top of the window to overlap the browser chrome. 117 // Set the top of the window to overlap the browser chrome.
117 void PositionChromeStyleWindow(const gfx::Size& size); 118 void PositionChromeStyleWindow(const gfx::Size& size);
118 119
119 content::NotificationRegistrar registrar_; 120 content::NotificationRegistrar registrar_;
120 content::WebContents* web_contents_; 121 content::WebContents* web_contents_;
121 122
122 // TODO(wittman): remove once all constrained window dialogs are moved 123 // TODO(wittman): remove once all constrained window dialogs are moved
123 // over to Chrome style. 124 // over to Chrome style.
124 const bool enable_chrome_style_; 125 const bool enable_chrome_style_;
125 126
126 // Client insets to use when |enable_chrome_style_| is true. 127 // What to layout by default in the frame when |enable_chrome_style_| is true.
127 ChromeStyleClientInsets chrome_style_client_insets_; 128 ChromeStyleFrameLayout chrome_style_frame_layout_;
128 129
129 NativeConstrainedWindow* native_constrained_window_; 130 NativeConstrainedWindow* native_constrained_window_;
130 131
131 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews); 132 DISALLOW_COPY_AND_ASSIGN(ConstrainedWindowViews);
132 }; 133 };
133 134
134 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_ 135 #endif // CHROME_BROWSER_UI_VIEWS_CONSTRAINED_WINDOW_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_window_frame_simple.cc ('k') | chrome/browser/ui/views/constrained_window_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698