| 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/ui/intents/web_intent_picker_controller.h" | 5 #include "chrome/browser/ui/intents/web_intent_picker_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "net/url_request/url_fetcher.h" | 50 #include "net/url_request/url_fetcher.h" |
| 51 #include "net/url_request/url_fetcher_delegate.h" | 51 #include "net/url_request/url_fetcher_delegate.h" |
| 52 #include "skia/ext/image_operations.h" | 52 #include "skia/ext/image_operations.h" |
| 53 #include "ui/base/l10n/l10n_util.h" | 53 #include "ui/base/l10n/l10n_util.h" |
| 54 #include "ui/gfx/codec/png_codec.h" | 54 #include "ui/gfx/codec/png_codec.h" |
| 55 #include "ui/gfx/favicon_size.h" | 55 #include "ui/gfx/favicon_size.h" |
| 56 #include "ui/gfx/image/image.h" | 56 #include "ui/gfx/image/image.h" |
| 57 | 57 |
| 58 using extensions::WebstoreInstaller; | 58 using extensions::WebstoreInstaller; |
| 59 | 59 |
| 60 int WebIntentPickerController::kUserDataKey; | 60 DEFINE_WEB_CONTENTS_USER_DATA_KEY(WebIntentPickerController) |
| 61 | 61 |
| 62 namespace { | 62 namespace { |
| 63 | 63 |
| 64 // Maximum amount of time to delay displaying dialog while waiting for data. | 64 // Maximum amount of time to delay displaying dialog while waiting for data. |
| 65 const int kMaxHiddenSetupTimeMs = 200; | 65 const int kMaxHiddenSetupTimeMs = 200; |
| 66 | 66 |
| 67 // Minimum amount of time to show waiting dialog, if it is shown. | 67 // Minimum amount of time to show waiting dialog, if it is shown. |
| 68 const int kMinThrobberDisplayTimeMs = 800; | 68 const int kMinThrobberDisplayTimeMs = 800; |
| 69 | 69 |
| 70 | 70 |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1057 web_intents::RecordPickerShow( | 1057 web_intents::RecordPickerShow( |
| 1058 uma_bucket_, picker_model_->GetInstalledServiceCount()); | 1058 uma_bucket_, picker_model_->GetInstalledServiceCount()); |
| 1059 picker_shown_ = true; | 1059 picker_shown_ = true; |
| 1060 } | 1060 } |
| 1061 | 1061 |
| 1062 void WebIntentPickerController::ClosePicker() { | 1062 void WebIntentPickerController::ClosePicker() { |
| 1063 SetDialogState(kPickerHidden); | 1063 SetDialogState(kPickerHidden); |
| 1064 if (picker_) | 1064 if (picker_) |
| 1065 picker_->Close(); | 1065 picker_->Close(); |
| 1066 } | 1066 } |
| OLD | NEW |