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

Side by Side Diff: chrome/browser/ui/intents/web_intent_picker_controller.cc

Issue 10993064: Make using WebContentsUserData simpler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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
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/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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698