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

Side by Side Diff: chrome/browser/ui/snapshot_tab_helper.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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/ui/sad_tab_observer.cc ('k') | chrome/browser/ui/tab_contents/core_tab_helper.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/snapshot_tab_helper.h" 5 #include "chrome/browser/ui/snapshot_tab_helper.h"
6 6
7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 7 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
8 #include "chrome/common/chrome_notification_types.h" 8 #include "chrome/common/chrome_notification_types.h"
9 #include "chrome/common/render_messages.h" 9 #include "chrome/common/render_messages.h"
10 #include "content/browser/tab_contents/tab_contents.h"
11 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
11 #include "content/public/browser/web_contents.h"
12 12
13 using content::WebContents; 13 using content::WebContents;
14 14
15 SnapshotTabHelper::SnapshotTabHelper(WebContents* tab) 15 SnapshotTabHelper::SnapshotTabHelper(WebContents* tab)
16 : content::WebContentsObserver(tab) { 16 : content::WebContentsObserver(tab) {
17 } 17 }
18 18
19 SnapshotTabHelper::~SnapshotTabHelper() { 19 SnapshotTabHelper::~SnapshotTabHelper() {
20 } 20 }
21 21
(...skipping 12 matching lines...) Expand all
34 IPC_END_MESSAGE_MAP() 34 IPC_END_MESSAGE_MAP()
35 return handled; 35 return handled;
36 } 36 }
37 37
38 //////////////////////////////////////////////////////////////////////////////// 38 ////////////////////////////////////////////////////////////////////////////////
39 // Internal helpers 39 // Internal helpers
40 40
41 void SnapshotTabHelper::OnSnapshot(const SkBitmap& bitmap) { 41 void SnapshotTabHelper::OnSnapshot(const SkBitmap& bitmap) {
42 content::NotificationService::current()->Notify( 42 content::NotificationService::current()->Notify(
43 chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN, 43 chrome::NOTIFICATION_TAB_SNAPSHOT_TAKEN,
44 content::Source<WebContents>(tab_contents()), 44 content::Source<WebContents>(web_contents()),
45 content::Details<const SkBitmap>(&bitmap)); 45 content::Details<const SkBitmap>(&bitmap));
46 } 46 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sad_tab_observer.cc ('k') | chrome/browser/ui/tab_contents/core_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698