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

Side by Side Diff: chrome/browser/ui/panels/panel_host.cc

Issue 10790062: [Panels refactor] Track Panels in TaskManager now that they are not under the tab contents umbrella. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback changes 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
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | no next file » | 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) 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/ui/panels/panel_host.h" 5 #include "chrome/browser/ui/panels/panel_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/chrome_page_zoom.h" 9 #include "chrome/browser/chrome_page_zoom.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 content::WebContentsObserver::Observe(web_contents_.get()); 51 content::WebContentsObserver::Observe(web_contents_.get());
52 52
53 favicon_tab_helper_.reset(new FaviconTabHelper(web_contents_.get())); 53 favicon_tab_helper_.reset(new FaviconTabHelper(web_contents_.get()));
54 54
55 web_contents_->GetController().LoadURL( 55 web_contents_->GetController().LoadURL(
56 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string()); 56 url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string());
57 } 57 }
58 58
59 void PanelHost::DestroyWebContents() { 59 void PanelHost::DestroyWebContents() {
60 web_contents_.reset(); 60 web_contents_.reset();
61 favicon_tab_helper_.reset();
61 } 62 }
62 63
63 SkBitmap PanelHost::GetPageIcon() const { 64 SkBitmap PanelHost::GetPageIcon() const {
64 return favicon_tab_helper_.get() ? 65 return favicon_tab_helper_.get() ?
65 favicon_tab_helper_->GetFavicon() : SkBitmap(); 66 favicon_tab_helper_->GetFavicon() : SkBitmap();
66 } 67 }
67 68
68 void PanelHost::NavigationStateChanged(const content::WebContents* source, 69 void PanelHost::NavigationStateChanged(const content::WebContents* source,
69 unsigned changed_flags) { 70 unsigned changed_flags) {
70 // Only need to update the title if the title changed while not loading, 71 // Only need to update the title if the title changed while not loading,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 } 181 }
181 182
182 void PanelHost::StopLoading() { 183 void PanelHost::StopLoading() {
183 content::RecordAction(UserMetricsAction("Stop")); 184 content::RecordAction(UserMetricsAction("Stop"));
184 web_contents_->Stop(); 185 web_contents_->Stop();
185 } 186 }
186 187
187 void PanelHost::Zoom(content::PageZoom zoom) { 188 void PanelHost::Zoom(content::PageZoom zoom) {
188 chrome_page_zoom::Zoom(web_contents_.get(), zoom); 189 chrome_page_zoom::Zoom(web_contents_.get(), zoom);
189 } 190 }
OLDNEW
« no previous file with comments | « chrome/browser/task_manager/task_manager_resource_providers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698