OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |