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

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

Issue 10252013: browser/ui: Remove unused definitions of CloseWebDialog() function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « chrome/browser/ui/gtk/web_dialog_gtk.cc ('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 "chrome/browser/ui/views/web_dialog_view.h" 5 #include "chrome/browser/ui/views/web_dialog_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/property_bag.h" 9 #include "base/property_bag.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 26 matching lines...) Expand all
37 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, 37 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent,
38 Profile* profile, 38 Profile* profile,
39 Browser* browser, 39 Browser* browser,
40 WebDialogDelegate* delegate) { 40 WebDialogDelegate* delegate) {
41 views::Widget* widget = views::Widget::CreateWindowWithParent( 41 views::Widget* widget = views::Widget::CreateWindowWithParent(
42 new WebDialogView(profile, browser, delegate), parent); 42 new WebDialogView(profile, browser, delegate), parent);
43 widget->Show(); 43 widget->Show();
44 return widget->GetNativeWindow(); 44 return widget->GetNativeWindow();
45 } 45 }
46 46
47 void CloseWebDialog(gfx::NativeWindow window) {
48 views::Widget::GetWidgetForNativeWindow(window)->Close();
49 }
50
51 } // namespace browser 47 } // namespace browser
52 48
53 //////////////////////////////////////////////////////////////////////////////// 49 ////////////////////////////////////////////////////////////////////////////////
54 // WebDialogView, public: 50 // WebDialogView, public:
55 51
56 WebDialogView::WebDialogView(Profile* profile, 52 WebDialogView::WebDialogView(Profile* profile,
57 Browser* browser, 53 Browser* browser,
58 WebDialogDelegate* delegate) 54 WebDialogDelegate* delegate)
59 : WebDialogWebContentsDelegate(profile), 55 : WebDialogWebContentsDelegate(profile),
60 initialized_(false), 56 initialized_(false),
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 315
320 if (delegate_) { 316 if (delegate_) {
321 gfx::Size out; 317 gfx::Size out;
322 delegate_->GetDialogSize(&out); 318 delegate_->GetDialogSize(&out);
323 if (!out.IsEmpty() && GetWidget()) 319 if (!out.IsEmpty() && GetWidget())
324 GetWidget()->CenterWindow(out); 320 GetWidget()->CenterWindow(out);
325 } 321 }
326 322
327 web_view_->LoadInitialURL(GetDialogContentURL()); 323 web_view_->LoadInitialURL(GetDialogContentURL());
328 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/web_dialog_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698