| OLD | NEW |
| 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/extensions/api/identity/identity_api.h" | 5 #include "chrome/browser/extensions/api/identity/identity_api.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/common/extensions/api/experimental_identity.h" | 8 #include "chrome/common/extensions/api/experimental_identity.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 10 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } else { | 179 } else { |
| 180 Browser* browser = | 180 Browser* browser = |
| 181 new Browser(Browser::CreateParams(Browser::TYPE_POPUP, profile())); | 181 new Browser(Browser::CreateParams(Browser::TYPE_POPUP, profile())); |
| 182 // TODO(munjal): Change the source from SOURCE_NTP_LINK to something else | 182 // TODO(munjal): Change the source from SOURCE_NTP_LINK to something else |
| 183 // once we have added a new source for extension API. | 183 // once we have added a new source for extension API. |
| 184 GURL signin_url(SyncPromoUI::GetSyncPromoURL(GURL(), | 184 GURL signin_url(SyncPromoUI::GetSyncPromoURL(GURL(), |
| 185 SyncPromoUI::SOURCE_NTP_LINK, | 185 SyncPromoUI::SOURCE_NTP_LINK, |
| 186 true)); | 186 true)); |
| 187 chrome::NavigateParams params(browser, | 187 chrome::NavigateParams params(browser, |
| 188 signin_url, | 188 signin_url, |
| 189 content::PAGE_TRANSITION_START_PAGE); | 189 content::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 190 params.disposition = CURRENT_TAB; | 190 params.disposition = CURRENT_TAB; |
| 191 params.window_action = chrome::NavigateParams::SHOW_WINDOW; | 191 params.window_action = chrome::NavigateParams::SHOW_WINDOW; |
| 192 chrome::Navigate(¶ms); | 192 chrome::Navigate(¶ms); |
| 193 } | 193 } |
| 194 } | 194 } |
| 195 | 195 |
| 196 void IdentityGetAuthTokenFunction::ShowOAuthApprovalDialog( | 196 void IdentityGetAuthTokenFunction::ShowOAuthApprovalDialog( |
| 197 const IssueAdviceInfo& issue_advice) { | 197 const IssueAdviceInfo& issue_advice) { |
| 198 install_ui_->ConfirmIssueAdvice(this, GetExtension(), issue_advice); | 198 install_ui_->ConfirmIssueAdvice(this, GetExtension(), issue_advice); |
| 199 } | 199 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 Release(); // Balanced in RunImpl. | 245 Release(); // Balanced in RunImpl. |
| 246 } | 246 } |
| 247 | 247 |
| 248 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { | 248 void IdentityLaunchWebAuthFlowFunction::OnAuthFlowFailure() { |
| 249 error_ = identity_constants::kInvalidRedirect; | 249 error_ = identity_constants::kInvalidRedirect; |
| 250 SendResponse(false); | 250 SendResponse(false); |
| 251 Release(); // Balanced in RunImpl. | 251 Release(); // Balanced in RunImpl. |
| 252 } | 252 } |
| 253 | 253 |
| 254 } // namespace extensions | 254 } // namespace extensions |
| OLD | NEW |