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

Side by Side Diff: chrome/browser/extensions/extension_global_error_badge.cc

Issue 10677009: Move command handling and updating off Browser and onto a helper object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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/extensions/extension_global_error_badge.h" 5 #include "chrome/browser/extensions/extension_global_error_badge.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_commands.h"
12 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
13 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
14 15
15 ExtensionGlobalErrorBadge::ExtensionGlobalErrorBadge() {} 16 ExtensionGlobalErrorBadge::ExtensionGlobalErrorBadge() {}
16 17
17 ExtensionGlobalErrorBadge::~ExtensionGlobalErrorBadge() {} 18 ExtensionGlobalErrorBadge::~ExtensionGlobalErrorBadge() {}
18 19
19 bool ExtensionGlobalErrorBadge::HasBadge() { 20 bool ExtensionGlobalErrorBadge::HasBadge() {
20 return true; 21 return true;
21 } 22 }
(...skipping 11 matching lines...) Expand all
33 } 34 }
34 35
35 void ExtensionGlobalErrorBadge::ExecuteMenuItem(Browser* browser) { 36 void ExtensionGlobalErrorBadge::ExecuteMenuItem(Browser* browser) {
36 ExtensionService* extension_service = 37 ExtensionService* extension_service =
37 browser->profile()->GetExtensionService(); 38 browser->profile()->GetExtensionService();
38 39
39 // Suppress all current warnings in the extension service from triggering 40 // Suppress all current warnings in the extension service from triggering
40 // a badge on the wrench menu in the future of this session. 41 // a badge on the wrench menu in the future of this session.
41 extension_service->extension_warnings()->SuppressBadgeForCurrentWarnings(); 42 extension_service->extension_warnings()->SuppressBadgeForCurrentWarnings();
42 43
43 browser->ExecuteCommand(IDC_MANAGE_EXTENSIONS); 44 chrome::ExecuteCommand(browser, IDC_MANAGE_EXTENSIONS);
44 } 45 }
45 46
46 bool ExtensionGlobalErrorBadge::HasBubbleView() { 47 bool ExtensionGlobalErrorBadge::HasBubbleView() {
47 return false; 48 return false;
48 } 49 }
49 50
50 string16 ExtensionGlobalErrorBadge::GetBubbleViewTitle() { 51 string16 ExtensionGlobalErrorBadge::GetBubbleViewTitle() {
51 return string16(); 52 return string16();
52 } 53 }
53 54
(...skipping 19 matching lines...) Expand all
73 74
74 void ExtensionGlobalErrorBadge::BubbleViewCancelButtonPressed( 75 void ExtensionGlobalErrorBadge::BubbleViewCancelButtonPressed(
75 Browser* browser) { 76 Browser* browser) {
76 NOTREACHED(); 77 NOTREACHED();
77 } 78 }
78 79
79 // static 80 // static
80 int ExtensionGlobalErrorBadge::GetMenuItemCommandID() { 81 int ExtensionGlobalErrorBadge::GetMenuItemCommandID() {
81 return IDC_EXTENSION_ERRORS; 82 return IDC_EXTENSION_ERRORS;
82 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | chrome/browser/global_keyboard_shortcuts_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698