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

Side by Side Diff: chrome/browser/chromeos/login/login_web_dialog.cc

Issue 13633003: Part of multiprofile implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 7 years, 8 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
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/chromeos/login/login_web_dialog.h" 5 #include "chrome/browser/chromeos/login/login_web_dialog.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/login/helper.h" 8 #include "chrome/browser/chromeos/login/helper.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/chromeos/profiles/profile_helper.h"
10 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser_dialogs.h" 11 #include "chrome/browser/ui/browser_dialogs.h"
11 #include "content/public/browser/notification_source.h" 12 #include "content/public/browser/notification_source.h"
12 #include "content/public/browser/notification_types.h" 13 #include "content/public/browser/notification_types.h"
13 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
14 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
15 #include "ui/gfx/size.h" 16 #include "ui/gfx/size.h"
16 #include "ui/views/widget/widget.h" 17 #include "ui/views/widget/widget.h"
17 18
18 using content::WebContents; 19 using content::WebContents;
19 using content::WebUIMessageHandler; 20 using content::WebUIMessageHandler;
(...skipping 30 matching lines...) Expand all
50 width_ = static_cast<int>(kDefaultWidthRatio * screen_bounds.width()); 51 width_ = static_cast<int>(kDefaultWidthRatio * screen_bounds.width());
51 height_ = static_cast<int>(kDefaultHeightRatio * screen_bounds.height()); 52 height_ = static_cast<int>(kDefaultHeightRatio * screen_bounds.height());
52 } 53 }
53 54
54 LoginWebDialog::~LoginWebDialog() { 55 LoginWebDialog::~LoginWebDialog() {
55 delegate_ = NULL; 56 delegate_ = NULL;
56 } 57 }
57 58
58 void LoginWebDialog::Show() { 59 void LoginWebDialog::Show() {
59 chrome::ShowWebDialog(parent_window_, 60 chrome::ShowWebDialog(parent_window_,
60 ProfileManager::GetDefaultProfile(), 61 ProfileHelper::GetSigninProfile(),
61 this); 62 this);
62 is_open_ = true; 63 is_open_ = true;
63 } 64 }
64 65
65 void LoginWebDialog::SetDialogSize(int width, int height) { 66 void LoginWebDialog::SetDialogSize(int width, int height) {
66 DCHECK(width >= 0 && height >= 0); 67 DCHECK(width >= 0 && height >= 0);
67 width_ = width; 68 width_ = width;
68 height_ = height; 69 height_ = height;
69 } 70 }
70 71
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 126
126 void LoginWebDialog::Observe(int type, 127 void LoginWebDialog::Observe(int type,
127 const content::NotificationSource& source, 128 const content::NotificationSource& source,
128 const content::NotificationDetails& details) { 129 const content::NotificationDetails& details) {
129 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME); 130 DCHECK(type == content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME);
130 // TODO(saintlou): Do we need a throbber for Aura? 131 // TODO(saintlou): Do we need a throbber for Aura?
131 NOTIMPLEMENTED(); 132 NOTIMPLEMENTED();
132 } 133 }
133 134
134 } // namespace chromeos 135 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_utils.cc ('k') | chrome/browser/chromeos/login/proxy_settings_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698