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

Side by Side Diff: chrome/browser/sidebar/sidebar_container.cc

Issue 3212005: Unify sidebar identification in the chrome.experimental.sidebar extension API... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 years, 3 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
« no previous file with comments | « chrome/browser/sidebar/sidebar_container.h ('k') | chrome/browser/sidebar/sidebar_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/sidebar/sidebar_container.h" 5 #include "chrome/browser/sidebar/sidebar_container.h"
6 6
7 #include "chrome/browser/renderer_host/render_view_host.h" 7 #include "chrome/browser/renderer_host/render_view_host.h"
8 #include "chrome/browser/tab_contents/navigation_controller.h" 8 #include "chrome/browser/tab_contents/navigation_controller.h"
9 #include "chrome/browser/tab_contents/navigation_entry.h" 9 #include "chrome/browser/tab_contents/navigation_entry.h"
10 #include "chrome/browser/tab_contents/tab_contents.h" 10 #include "chrome/browser/tab_contents/tab_contents.h"
(...skipping 18 matching lines...) Expand all
29 sidebar_contents_->set_delegate(this); 29 sidebar_contents_->set_delegate(this);
30 } 30 }
31 31
32 SidebarContainer::~SidebarContainer() { 32 SidebarContainer::~SidebarContainer() {
33 } 33 }
34 34
35 void SidebarContainer::SidebarClosing() { 35 void SidebarContainer::SidebarClosing() {
36 delegate_->UpdateSidebar(this); 36 delegate_->UpdateSidebar(this);
37 } 37 }
38 38
39 int SidebarContainer::GetTabId() const {
40 return tab_->controller().session_id().id();
41 }
42
43 void SidebarContainer::Show() { 39 void SidebarContainer::Show() {
44 delegate_->UpdateSidebar(this); 40 delegate_->UpdateSidebar(this);
45 } 41 }
46 42
47 void SidebarContainer::Expand() { 43 void SidebarContainer::Expand() {
48 delegate_->UpdateSidebar(this); 44 delegate_->UpdateSidebar(this);
49 sidebar_contents_->view()->SetInitialFocus(); 45 sidebar_contents_->view()->SetInitialFocus();
50 } 46 }
51 47
52 void SidebarContainer::Collapse() { 48 void SidebarContainer::Collapse() {
(...skipping 11 matching lines...) Expand all
64 badge_text_ = badge_text; 60 badge_text_ = badge_text;
65 } 61 }
66 62
67 void SidebarContainer::SetIcon(const SkBitmap& bitmap) { 63 void SidebarContainer::SetIcon(const SkBitmap& bitmap) {
68 *icon_ = bitmap; 64 *icon_ = bitmap;
69 } 65 }
70 66
71 void SidebarContainer::SetTitle(const string16& title) { 67 void SidebarContainer::SetTitle(const string16& title) {
72 title_ = title; 68 title_ = title;
73 } 69 }
OLDNEW
« no previous file with comments | « chrome/browser/sidebar/sidebar_container.h ('k') | chrome/browser/sidebar/sidebar_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698