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

Side by Side Diff: content/browser/host_zoom_level_context.cc

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address sky@'s comments. Created 6 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/host_zoom_level_context.h"
6
7 #include "base/files/file_path.h"
8 #include "content/browser/host_zoom_map_impl.h"
9 #include "content/public/browser/browser_thread.h"
10
11 namespace content {
12
13 HostZoomLevelContext::HostZoomLevelContext(
14 scoped_ptr<ZoomLevelDelegate> zoom_level_delegate)
15 : host_zoom_map_impl_(new HostZoomMapImpl()),
16 zoom_level_delegate_(zoom_level_delegate.release()) {
boliu 2014/11/11 21:47:11 s/release/Pass/
wjmaclean 2014/11/12 15:12:55 Done.
17 if (zoom_level_delegate_)
18 zoom_level_delegate_->InitHostZoomMap(host_zoom_map_impl_.get());
19 }
20
21 HostZoomLevelContext::~HostZoomLevelContext() {}
22
23 void HostZoomLevelContext::DeleteOnCorrectThread() const {
24 if (BrowserThread::IsMessageLoopValid(BrowserThread::UI) &&
25 !BrowserThread::CurrentlyOn(BrowserThread::UI)) {
26 BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, this);
27 return;
28 }
29 delete this;
30 }
31
32 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698