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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_internal.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 enum State { 112 enum State {
113 kPlaying, 113 kPlaying,
114 kPaused, 114 kPaused,
115 kError 115 kError
116 }; 116 };
117 117
118 // Carries the current playback state. 118 // Carries the current playback state.
119 State state; 119 State state;
120 }; 120 };
121 121
122 // The user has completed a find-in-page; this type defines what actions the
123 // renderer should take next.
124 struct ViewMsg_StopFinding_Params {
125 enum Action {
126 kClearSelection,
127 kKeepSelection,
128 kActivateSelection
129 };
130
131 // The action that should be taken when the find is completed.
132 Action action;
133 };
134
122 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data 135 // Parameters structure for ViewHostMsg_FrameNavigate, which has too many data
123 // parameters to be reasonably put in a predefined IPC message. 136 // parameters to be reasonably put in a predefined IPC message.
124 struct ViewHostMsg_FrameNavigate_Params { 137 struct ViewHostMsg_FrameNavigate_Params {
125 // Page ID of this navigation. The renderer creates a new unique page ID 138 // Page ID of this navigation. The renderer creates a new unique page ID
126 // anytime a new session history entry is created. This means you'll get new 139 // anytime a new session history entry is created. This means you'll get new
127 // page IDs for user actions, and the old page IDs will be reloaded when 140 // page IDs for user actions, and the old page IDs will be reloaded when
128 // iframes are loaded automatically. 141 // iframes are loaded automatically.
129 int32 page_id; 142 int32 page_id;
130 143
131 // URL of the page being loaded. 144 // URL of the page being loaded.
(...skipping 1859 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 break; 2004 break;
1992 default: 2005 default:
1993 state = L"UNKNOWN"; 2006 state = L"UNKNOWN";
1994 break; 2007 break;
1995 } 2008 }
1996 LogParam(state, l); 2009 LogParam(state, l);
1997 } 2010 }
1998 }; 2011 };
1999 2012
2000 template <> 2013 template <>
2014 struct ParamTraits<ViewMsg_StopFinding_Params> {
2015 typedef ViewMsg_StopFinding_Params param_type;
2016 static void Write(Message* m, const param_type& p) {
2017 m->WriteInt(p.action);
2018 }
2019 static bool Read(const Message* m, void** iter, param_type* p) {
2020 int type;
2021 if (!m->ReadInt(iter, &type))
2022 return false;
2023 p->action = static_cast<ViewMsg_StopFinding_Params::Action>(type);
2024 return true;
2025 }
2026 static void Log(const param_type& p, std::wstring* l) {
2027 std::wstring action;
2028 switch (p.action) {
2029 case ViewMsg_StopFinding_Params::kClearSelection:
2030 action = L"ViewMsg_StopFinding_Params::kClearSelection";
2031 break;
2032 case ViewMsg_StopFinding_Params::kKeepSelection:
2033 action = L"ViewMsg_StopFinding_Params::kKeepSelection";
2034 break;
2035 case ViewMsg_StopFinding_Params::kActivateSelection:
2036 action = L"ViewMsg_StopFinding_Params::kActivateSelection";
2037 break;
2038 default:
2039 action = L"UNKNOWN";
2040 break;
2041 }
2042 LogParam(action, l);
2043 }
2044 };
2045
2046 template <>
2001 struct ParamTraits<ViewMsg_DatabaseOpenFileResponse_Params> { 2047 struct ParamTraits<ViewMsg_DatabaseOpenFileResponse_Params> {
2002 typedef ViewMsg_DatabaseOpenFileResponse_Params param_type; 2048 typedef ViewMsg_DatabaseOpenFileResponse_Params param_type;
2003 static void Write(Message* m, const param_type& p) { 2049 static void Write(Message* m, const param_type& p) {
2004 WriteParam(m, p.file_handle); 2050 WriteParam(m, p.file_handle);
2005 #if defined(OS_POSIX) 2051 #if defined(OS_POSIX)
2006 WriteParam(m, p.dir_handle); 2052 WriteParam(m, p.dir_handle);
2007 #endif 2053 #endif
2008 } 2054 }
2009 static bool Read(const Message* m, void** iter, param_type* p) { 2055 static bool Read(const Message* m, void** iter, param_type* p) {
2010 bool ret = ReadParam(m, iter, &p->file_handle); 2056 bool ret = ReadParam(m, iter, &p->file_handle);
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 } 2643 }
2598 }; 2644 };
2599 2645
2600 } // namespace IPC 2646 } // namespace IPC
2601 2647
2602 2648
2603 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 2649 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
2604 #include "ipc/ipc_message_macros.h" 2650 #include "ipc/ipc_message_macros.h"
2605 2651
2606 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 2652 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« 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