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

Unified Diff: chrome/browser/extensions/extension_sidebar_api.cc

Issue 6250141: Sidebar mini tabs UI (views version).... Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_sidebar_api.h ('k') | chrome/browser/sidebar/sidebar_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_sidebar_api.cc
===================================================================
--- chrome/browser/extensions/extension_sidebar_api.cc (revision 74134)
+++ chrome/browser/extensions/extension_sidebar_api.cc (working copy)
@@ -15,7 +15,6 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sidebar/sidebar_container.h"
#include "chrome/browser/sidebar/sidebar_manager.h"
-#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -54,9 +53,11 @@
// static
void ExtensionSidebarEventRouter::OnStateChanged(
- Profile* profile, TabContents* tab, const std::string& content_id,
+ Profile* profile,
+ TabContentsWrapper* tab,
+ const std::string& content_id,
const std::string& state) {
- int tab_id = ExtensionTabUtil::GetTabId(tab);
+ int tab_id = ExtensionTabUtil::GetTabId(tab->tab_contents());
DictionaryValue* details = new DictionaryValue;
details->Set(kTabIdKey, Value::CreateIntegerValue(tab_id));
details->Set(kStateKey, Value::CreateStringValue(state));
@@ -129,18 +130,18 @@
return false;
std::string content_id(GetExtension()->id());
- return RunImpl(tab_contents->tab_contents(), content_id, *details);
+ return RunImpl(tab_contents, content_id, *details);
}
-bool CollapseSidebarFunction::RunImpl(TabContents* tab,
+bool CollapseSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
SidebarManager::GetInstance()->CollapseSidebar(tab, content_id);
return true;
}
-bool ExpandSidebarFunction::RunImpl(TabContents* tab,
+bool ExpandSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
// TODO(alekseys): enable this check back when WebKit's user gesture flag
@@ -153,7 +154,7 @@
return true;
}
-bool GetStateSidebarFunction::RunImpl(TabContents* tab,
+bool GetStateSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
SidebarManager* manager = SidebarManager::GetInstance();
@@ -194,14 +195,14 @@
return true;
}
-bool HideSidebarFunction::RunImpl(TabContents* tab,
+bool HideSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
SidebarManager::GetInstance()->HideSidebar(tab, content_id);
return true;
}
-bool NavigateSidebarFunction::RunImpl(TabContents* tab,
+bool NavigateSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
std::string path_string;
@@ -216,7 +217,7 @@
return true;
}
-bool SetBadgeTextSidebarFunction::RunImpl(TabContents* tab,
+bool SetBadgeTextSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
string16 badge_text;
@@ -226,7 +227,7 @@
return true;
}
-bool SetIconSidebarFunction::RunImpl(TabContents* tab,
+bool SetIconSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
BinaryValue* binary;
@@ -240,7 +241,7 @@
return true;
}
-bool SetTitleSidebarFunction::RunImpl(TabContents* tab,
+bool SetTitleSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
string16 title;
@@ -249,7 +250,7 @@
return true;
}
-bool ShowSidebarFunction::RunImpl(TabContents* tab,
+bool ShowSidebarFunction::RunImpl(TabContentsWrapper* tab,
const std::string& content_id,
const DictionaryValue& details) {
SidebarManager::GetInstance()->ShowSidebar(tab, content_id);
« no previous file with comments | « chrome/browser/extensions/extension_sidebar_api.h ('k') | chrome/browser/sidebar/sidebar_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698