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

Side by Side Diff: components/visitedlink/renderer/visitedlink_slave.h

Issue 11825011: Componentize visitedlinks to src/components/visitedlink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Final rebase Created 7 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
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 #ifndef CHROME_RENDERER_VISITEDLINK_SLAVE_H_ 5 #ifndef COMPONENTS_VISITEDLINK_RENDERER_VISITEDLINK_SLAVE_H_
6 #define CHROME_RENDERER_VISITEDLINK_SLAVE_H_ 6 #define COMPONENTS_VISITEDLINK_RENDERER_VISITEDLINK_SLAVE_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/shared_memory.h" 9 #include "base/shared_memory.h"
10 #include "chrome/common/visitedlink_common.h" 10 #include "components/visitedlink/common/visitedlink_common.h"
11 #include "content/public/renderer/render_process_observer.h" 11 #include "content/public/renderer/render_process_observer.h"
12 12
13 namespace components {
14
13 // Reads the link coloring database provided by the master. There can be any 15 // Reads the link coloring database provided by the master. There can be any
14 // number of slaves reading the same database. 16 // number of slaves reading the same database.
15 class VisitedLinkSlave : public VisitedLinkCommon, 17 class VisitedLinkSlave : public VisitedLinkCommon,
16 public content::RenderProcessObserver { 18 public content::RenderProcessObserver {
17 public: 19 public:
18 VisitedLinkSlave(); 20 VisitedLinkSlave();
19 virtual ~VisitedLinkSlave(); 21 virtual ~VisitedLinkSlave();
20 22
21 // RenderProcessObserver implementation. 23 // RenderProcessObserver implementation.
22 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE; 24 virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
23 25
24 // Message handlers. 26 // Message handlers.
25 void OnUpdateVisitedLinks(base::SharedMemoryHandle table); 27 void OnUpdateVisitedLinks(base::SharedMemoryHandle table);
26 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints); 28 void OnAddVisitedLinks(const VisitedLinkSlave::Fingerprints& fingerprints);
27 void OnResetVisitedLinks(); 29 void OnResetVisitedLinks();
28 private: 30 private:
29 void FreeTable(); 31 void FreeTable();
30 32
31 // shared memory consists of a SharedHeader followed by the table 33 // shared memory consists of a SharedHeader followed by the table
32 base::SharedMemory* shared_memory_; 34 base::SharedMemory* shared_memory_;
33 35
34 DISALLOW_COPY_AND_ASSIGN(VisitedLinkSlave); 36 DISALLOW_COPY_AND_ASSIGN(VisitedLinkSlave);
35 }; 37 };
36 38
37 #endif // CHROME_RENDERER_VISITEDLINK_SLAVE_H_ 39 } // namespace components
40
41 #endif // COMPONENTS_VISITEDLINK_RENDERER_VISITEDLINK_SLAVE_H_
OLDNEW
« no previous file with comments | « components/visitedlink/renderer/DEPS ('k') | components/visitedlink/renderer/visitedlink_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698