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

Unified Diff: chrome/common/render_messages.h

Issue 660137: Allow users to close the find session and activate the current link via ctrl-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
===================================================================
--- chrome/common/render_messages.h (revision 41087)
+++ chrome/common/render_messages.h (working copy)
@@ -119,6 +119,19 @@
State state;
};
+// The user has completed a find-in-page; this type defines what actions the
+// renderer should take next.
+struct ViewMsg_StopFinding_Params {
+ enum Action {
+ kClearSelection,
+ kKeepSelection,
+ kActivateSelection
+ };
+
+ // The action that should be taken when the find is completed.
+ Action action;
+};
+
// Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
// parameters to be reasonably put in a predefined IPC message.
struct ViewHostMsg_FrameNavigate_Params {
@@ -1998,6 +2011,39 @@
};
template <>
+struct ParamTraits<ViewMsg_StopFinding_Params> {
+ typedef ViewMsg_StopFinding_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ m->WriteInt(p.action);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ int type;
+ if (!m->ReadInt(iter, &type))
+ return false;
+ p->action = static_cast<ViewMsg_StopFinding_Params::Action>(type);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ std::wstring action;
+ switch (p.action) {
+ case ViewMsg_StopFinding_Params::kClearSelection:
+ action = L"ViewMsg_StopFinding_Params::kClearSelection";
+ break;
+ case ViewMsg_StopFinding_Params::kKeepSelection:
+ action = L"ViewMsg_StopFinding_Params::kKeepSelection";
+ break;
+ case ViewMsg_StopFinding_Params::kActivateSelection:
+ action = L"ViewMsg_StopFinding_Params::kActivateSelection";
+ break;
+ default:
+ action = L"UNKNOWN";
+ break;
+ }
+ LogParam(action, l);
+ }
+};
+
+template <>
struct ParamTraits<ViewMsg_DatabaseOpenFileResponse_Params> {
typedef ViewMsg_DatabaseOpenFileResponse_Params param_type;
static void Write(Message* m, const param_type& p) {
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698