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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controller.mm

Issue 2771233002: Remove the wrapper functions content::RecordAction et al (Closed)
Patch Set: Rebased Created 3 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 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle r.h" 5 #import "chrome/browser/ui/cocoa/extensions/extension_installed_bubble_controlle r.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
11 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/metrics/user_metrics.h"
14 #include "base/strings/sys_string_conversions.h" 15 #include "base/strings/sys_string_conversions.h"
15 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/extensions/extension_action.h" 17 #include "chrome/browser/extensions/extension_action.h"
17 #include "chrome/browser/extensions/extension_action_manager.h" 18 #include "chrome/browser/extensions/extension_action_manager.h"
18 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/browser.h"
19 #include "chrome/browser/ui/browser_navigator.h" 20 #include "chrome/browser/ui/browser_navigator.h"
20 #include "chrome/browser/ui/browser_navigator_params.h" 21 #include "chrome/browser/ui/browser_navigator_params.h"
21 #include "chrome/browser/ui/browser_window.h" 22 #include "chrome/browser/ui/browser_window.h"
22 #include "chrome/browser/ui/chrome_pages.h" 23 #include "chrome/browser/ui/chrome_pages.h"
23 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 24 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
(...skipping 13 matching lines...) Expand all
37 #include "chrome/browser/ui/sync/sync_promo_ui.h" 38 #include "chrome/browser/ui/sync/sync_promo_ui.h"
38 #include "chrome/common/extensions/api/omnibox/omnibox_handler.h" 39 #include "chrome/common/extensions/api/omnibox/omnibox_handler.h"
39 #include "chrome/common/extensions/sync_helper.h" 40 #include "chrome/common/extensions/sync_helper.h"
40 #include "chrome/common/url_constants.h" 41 #include "chrome/common/url_constants.h"
41 #include "chrome/grit/chromium_strings.h" 42 #include "chrome/grit/chromium_strings.h"
42 #include "chrome/grit/generated_resources.h" 43 #include "chrome/grit/generated_resources.h"
43 #include "components/bubble/bubble_controller.h" 44 #include "components/bubble/bubble_controller.h"
44 #include "components/bubble/bubble_ui.h" 45 #include "components/bubble/bubble_ui.h"
45 #include "components/signin/core/browser/signin_metrics.h" 46 #include "components/signin/core/browser/signin_metrics.h"
46 #include "content/public/browser/browser_thread.h" 47 #include "content/public/browser/browser_thread.h"
47 #include "content/public/browser/user_metrics.h"
48 #include "extensions/browser/install/extension_install_ui.h" 48 #include "extensions/browser/install/extension_install_ui.h"
49 #include "extensions/common/extension.h" 49 #include "extensions/common/extension.h"
50 #import "skia/ext/skia_utils_mac.h" 50 #import "skia/ext/skia_utils_mac.h"
51 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h" 51 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw eaker.h"
52 #include "third_party/skia/include/core/SkBitmap.h" 52 #include "third_party/skia/include/core/SkBitmap.h"
53 #include "ui/base/cocoa/cocoa_base_utils.h" 53 #include "ui/base/cocoa/cocoa_base_utils.h"
54 #import "ui/base/cocoa/controls/hyperlink_text_view.h" 54 #import "ui/base/cocoa/controls/hyperlink_text_view.h"
55 #include "ui/base/l10n/l10n_util.h" 55 #include "ui/base/l10n/l10n_util.h"
56 56
57 using content::BrowserThread; 57 using content::BrowserThread;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 newFrame.size.height += windowDelta.height; 264 newFrame.size.height += windowDelta.height;
265 [window setFrame:newFrame display:NO]; 265 [window setFrame:newFrame display:NO];
266 266
267 // Now that we have resized the window, adjust y pos of the messages. 267 // Now that we have resized the window, adjust y pos of the messages.
268 [self setMessageFrames:newWindowHeight]; 268 [self setMessageFrames:newWindowHeight];
269 269
270 // Find window origin, taking into account bubble size and arrow location. 270 // Find window origin, taking into account bubble size and arrow location.
271 [self updateAnchorPosition]; 271 [self updateAnchorPosition];
272 272
273 if (syncPromoController_) { 273 if (syncPromoController_) {
274 content::RecordAction(base::UserMetricsAction( 274 base::RecordAction(base::UserMetricsAction(
275 "Signin_Impression_FromExtensionInstallBubble")); 275 "Signin_Impression_FromExtensionInstallBubble"));
276 } 276 }
277 [super showWindow:sender]; 277 [super showWindow:sender];
278 } 278 }
279 279
280 // Finish nib loading, set arrow location and load icon into window. This 280 // Finish nib loading, set arrow location and load icon into window. This
281 // function is exposed for unit testing. 281 // function is exposed for unit testing.
282 - (NSWindow*)initializeWindow { 282 - (NSWindow*)initializeWindow {
283 NSWindow* window = [self window]; // completes nib load 283 NSWindow* window = [self window]; // completes nib load
284 284
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 extensions::CreateExtensionInstallUI(browser_->profile())); 467 extensions::CreateExtensionInstallUI(browser_->profile()));
468 install_ui->OpenAppInstalledUI([self extension]->id()); 468 install_ui->OpenAppInstalledUI([self extension]->id());
469 } 469 }
470 470
471 - (void)doClose { 471 - (void)doClose {
472 installedBubble_ = nullptr; 472 installedBubble_ = nullptr;
473 [self close]; 473 [self close];
474 } 474 }
475 475
476 @end 476 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698