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

Side by Side Diff: ui/views/widget/widget_delegate.cc

Issue 55303006: Make sure the non browser/non app widget is fully visible when created on ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | « ui/views/widget/widget_delegate.h ('k') | no next file » | 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 "ui/views/widget/widget_delegate.h" 5 #include "ui/views/widget/widget_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/gfx/image/image_skia.h" 8 #include "ui/gfx/image/image_skia.h"
9 #include "ui/views/bubble/bubble_delegate.h" 9 #include "ui/views/bubble/bubble_delegate.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ui::WindowShowState show_state) { 111 ui::WindowShowState show_state) {
112 std::string window_name = GetWindowName(); 112 std::string window_name = GetWindowName();
113 if (!ViewsDelegate::views_delegate || window_name.empty()) 113 if (!ViewsDelegate::views_delegate || window_name.empty())
114 return; 114 return;
115 115
116 ViewsDelegate::views_delegate->SaveWindowPlacement( 116 ViewsDelegate::views_delegate->SaveWindowPlacement(
117 GetWidget(), window_name, bounds, show_state); 117 GetWidget(), window_name, bounds, show_state);
118 } 118 }
119 119
120 bool WidgetDelegate::GetSavedWindowPlacement( 120 bool WidgetDelegate::GetSavedWindowPlacement(
121 const Widget* widget,
121 gfx::Rect* bounds, 122 gfx::Rect* bounds,
122 ui::WindowShowState* show_state) const { 123 ui::WindowShowState* show_state) const {
123 std::string window_name = GetWindowName(); 124 std::string window_name = GetWindowName();
124 if (!ViewsDelegate::views_delegate || window_name.empty()) 125 if (!ViewsDelegate::views_delegate || window_name.empty())
125 return false; 126 return false;
126 127
127 return ViewsDelegate::views_delegate->GetSavedWindowPlacement( 128 return ViewsDelegate::views_delegate->GetSavedWindowPlacement(
128 window_name, bounds, show_state); 129 widget, window_name, bounds, show_state);
129 } 130 }
130 131
131 bool WidgetDelegate::ShouldRestoreWindowSize() const { 132 bool WidgetDelegate::ShouldRestoreWindowSize() const {
132 return true; 133 return true;
133 } 134 }
134 135
135 View* WidgetDelegate::GetContentsView() { 136 View* WidgetDelegate::GetContentsView() {
136 if (!default_contents_view_) 137 if (!default_contents_view_)
137 default_contents_view_ = new View; 138 default_contents_view_ = new View;
138 return default_contents_view_; 139 return default_contents_view_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 190
190 Widget* WidgetDelegateView::GetWidget() { 191 Widget* WidgetDelegateView::GetWidget() {
191 return View::GetWidget(); 192 return View::GetWidget();
192 } 193 }
193 194
194 const Widget* WidgetDelegateView::GetWidget() const { 195 const Widget* WidgetDelegateView::GetWidget() const {
195 return View::GetWidget(); 196 return View::GetWidget();
196 } 197 }
197 198
198 } // namespace views 199 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/widget_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698