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

Side by Side Diff: chrome/browser/ui/toolbar/action_box_button_controller.h

Issue 11073009: Include individual share intents in the action box and allow direct triggering without an intermedi… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressing review nits 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
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 #ifndef CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 int GetCommandIdForExtension(const extensions::Extension& extension); 61 int GetCommandIdForExtension(const extensions::Extension& extension);
62 62
63 // Gets the extension for a command ID, or NULL if there isn't one. 63 // Gets the extension for a command ID, or NULL if there isn't one.
64 const extensions::Extension* GetExtensionForCommandId(int command_id); 64 const extensions::Extension* GetExtensionForCommandId(int command_id);
65 65
66 // content::NotificationObserver implementation. 66 // content::NotificationObserver implementation.
67 virtual void Observe(int type, 67 virtual void Observe(int type,
68 const content::NotificationSource& source, 68 const content::NotificationSource& source,
69 const content::NotificationDetails& details) OVERRIDE; 69 const content::NotificationDetails& details) OVERRIDE;
70 70
71 // Handles "share with X" commands.
72 void TriggerExplicitShareIntent(const GURL& share_service_url);
73
74 // Handles the "Find places to share" command. Navigates the browser to the
75 // web store to find extensions with share intents.
76 void NavigateToWebStoreShareIntentsList();
77
71 Browser* browser_; 78 Browser* browser_;
72 79
73 Delegate* delegate_; 80 Delegate* delegate_;
74 81
82 // The share service strings that have commands associated with them.
83 typedef std::map<int, GURL> ShareIntentServiceCommandMap;
84 ShareIntentServiceCommandMap share_intent_service_ids_;
85
75 // The command ID to assign to the next extension that needs one. 86 // The command ID to assign to the next extension that needs one.
76 int next_extension_command_id_; 87 int next_extension_command_id_;
77 88
78 // The extension IDs that have commands associated with them. 89 // The extension IDs that have commands associated with them.
79 typedef std::map<std::string, int> ExtensionIdCommandMap; 90 typedef std::map<std::string, int> ExtensionIdCommandMap;
80 ExtensionIdCommandMap extension_command_ids_; 91 ExtensionIdCommandMap extension_command_ids_;
81 92
82 content::NotificationRegistrar registrar_; 93 content::NotificationRegistrar registrar_;
83 94
84 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonController); 95 DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonController);
85 }; 96 };
86 97
87 #endif // CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_ 98 #endif // CHROME_BROWSER_UI_TOOLBAR_ACTION_BOX_BUTTON_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_commands.cc ('k') | chrome/browser/ui/toolbar/action_box_button_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698