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

Side by Side Diff: chrome/common/render_messages.h

Issue 7990005: Use a placeholder instead of the default plugin for missing plug-ins on Mac and Linux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 9 years, 2 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/common/default_plugin.cc ('k') | chrome/renderer/blocked_plugin.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 // Multiply-included file, no traditional include guard. 5 // Multiply-included file, no traditional include guard.
6 #include <map> 6 #include <map>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 // TODO(erg): This list has been temporarily annotated by erg while doing work 11 // TODO(erg): This list has been temporarily annotated by erg while doing work
12 // on which headers to pull out. 12 // on which headers to pull out.
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/file_path.h" 14 #include "base/file_path.h"
15 #include "base/process.h" 15 #include "base/process.h"
16 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
17 #include "base/string16.h" 17 #include "base/string16.h"
18 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "chrome/common/common_param_traits.h" 21 #include "chrome/common/common_param_traits.h"
22 #include "chrome/common/instant_types.h" 22 #include "chrome/common/instant_types.h"
23 #include "chrome/common/nacl_types.h" 23 #include "chrome/common/nacl_types.h"
24 #include "chrome/common/search_provider.h" 24 #include "chrome/common/search_provider.h"
25 #include "chrome/common/thumbnail_score.h" 25 #include "chrome/common/thumbnail_score.h"
26 #include "chrome/common/translate_errors.h" 26 #include "chrome/common/translate_errors.h"
27 #include "content/common/common_param_traits.h" 27 #include "content/common/common_param_traits.h"
28 #include "content/common/webkit_param_traits.h"
28 #include "ipc/ipc_message_macros.h" 29 #include "ipc/ipc_message_macros.h"
29 #include "ipc/ipc_platform_file.h" 30 #include "ipc/ipc_platform_file.h"
30 #include "third_party/skia/include/core/SkBitmap.h" 31 #include "third_party/skia/include/core/SkBitmap.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" 33 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
33 #include "ui/gfx/rect.h" 34 #include "ui/gfx/rect.h"
34 35
35 // Singly-included section for enums and custom IPC traits. 36 // Singly-included section for enums and custom IPC traits.
36 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 37 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
37 #define CHROME_COMMON_RENDER_MESSAGES_H_ 38 #define CHROME_COMMON_RENDER_MESSAGES_H_
38 39
39 class SkBitmap; 40 class SkBitmap;
40 41
41 // Command values for the cmd parameter of the 42 // Command values for the cmd parameter of the
42 // ViewHost_JavaScriptStressTestControl message. For each command the parameter 43 // ViewHost_JavaScriptStressTestControl message. For each command the parameter
43 // passed has a different meaning: 44 // passed has a different meaning:
44 // For the command kJavaScriptStressTestSetStressRunType the parameter it the 45 // For the command kJavaScriptStressTestSetStressRunType the parameter it the
45 // type taken from the enumeration v8::Testing::StressType. 46 // type taken from the enumeration v8::Testing::StressType.
46 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the 47 // For the command kJavaScriptStressTestPrepareStressRun the parameter it the
47 // number of the stress run about to take place. 48 // number of the stress run about to take place.
48 enum ViewHostMsg_JavaScriptStressTestControl_Commands { 49 enum ViewHostMsg_JavaScriptStressTestControl_Commands {
49 kJavaScriptStressTestSetStressRunType = 0, 50 kJavaScriptStressTestSetStressRunType = 0,
50 kJavaScriptStressTestPrepareStressRun = 1, 51 kJavaScriptStressTestPrepareStressRun = 1,
51 }; 52 };
52 53
54 // This enum is inside a struct so that we can forward-declare the struct in
55 // others headers without having to include this one.
56 struct ChromeViewHostMsg_GetPluginInfo_Status {
57 // TODO(bauerb): Add more status values (blocked, click-to-play, out of date,
58 // requires authorization).
59 enum Value {
60 kAllowed,
61 kDisabled,
62 kNotFound,
63 };
64
65 ChromeViewHostMsg_GetPluginInfo_Status() : value(kAllowed) {}
66
67 Value value;
68 };
69
53 namespace IPC { 70 namespace IPC {
54 71
55 #if defined(OS_POSIX) && !defined(USE_AURA) 72 #if defined(OS_POSIX) && !defined(USE_AURA)
56 73
57 // TODO(port): this shouldn't exist. However, the plugin stuff is really using 74 // TODO(port): this shouldn't exist. However, the plugin stuff is really using
58 // HWNDS (NativeView), and making Windows calls based on them. I've not figured 75 // HWNDS (NativeView), and making Windows calls based on them. I've not figured
59 // out the deal with plugins yet. 76 // out the deal with plugins yet.
60 template <> 77 template <>
61 struct ParamTraits<gfx::NativeView> { 78 struct ParamTraits<gfx::NativeView> {
62 typedef gfx::NativeView param_type; 79 typedef gfx::NativeView param_type;
(...skipping 21 matching lines...) Expand all
84 static bool Read(const Message* m, void** iter, param_type* r); 101 static bool Read(const Message* m, void** iter, param_type* r);
85 static void Log(const param_type& p, std::string* l); 102 static void Log(const param_type& p, std::string* l);
86 }; 103 };
87 104
88 } // namespace IPC 105 } // namespace IPC
89 106
90 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 107 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
91 108
92 #define IPC_MESSAGE_START ChromeMsgStart 109 #define IPC_MESSAGE_START ChromeMsgStart
93 110
111 IPC_ENUM_TRAITS(ChromeViewHostMsg_GetPluginInfo_Status::Value)
94 IPC_ENUM_TRAITS(InstantCompleteBehavior) 112 IPC_ENUM_TRAITS(InstantCompleteBehavior)
95 IPC_ENUM_TRAITS(search_provider::OSDDType) 113 IPC_ENUM_TRAITS(search_provider::OSDDType)
96 IPC_ENUM_TRAITS(search_provider::InstallState) 114 IPC_ENUM_TRAITS(search_provider::InstallState)
97 IPC_ENUM_TRAITS(TranslateErrors::Type) 115 IPC_ENUM_TRAITS(TranslateErrors::Type)
98 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level) 116 IPC_ENUM_TRAITS(WebKit::WebConsoleMessage::Level)
99 117
118 IPC_STRUCT_TRAITS_BEGIN(ChromeViewHostMsg_GetPluginInfo_Status)
119 IPC_STRUCT_TRAITS_MEMBER(value)
120 IPC_STRUCT_TRAITS_END()
121
100 IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore) 122 IPC_STRUCT_TRAITS_BEGIN(ThumbnailScore)
101 IPC_STRUCT_TRAITS_MEMBER(boring_score) 123 IPC_STRUCT_TRAITS_MEMBER(boring_score)
102 IPC_STRUCT_TRAITS_MEMBER(good_clipping) 124 IPC_STRUCT_TRAITS_MEMBER(good_clipping)
103 IPC_STRUCT_TRAITS_MEMBER(at_top) 125 IPC_STRUCT_TRAITS_MEMBER(at_top)
104 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot) 126 IPC_STRUCT_TRAITS_MEMBER(time_at_snapshot)
105 IPC_STRUCT_TRAITS_END() 127 IPC_STRUCT_TRAITS_END()
106 128
107 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat) 129 IPC_STRUCT_TRAITS_BEGIN(WebKit::WebCache::ResourceTypeStat)
108 IPC_STRUCT_TRAITS_MEMBER(count) 130 IPC_STRUCT_TRAITS_MEMBER(count)
109 IPC_STRUCT_TRAITS_MEMBER(size) 131 IPC_STRUCT_TRAITS_MEMBER(size)
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 // 399 //
378 // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is 400 // If |setting| is set to CONTENT_SETTING_DEFAULT, the plug-in is
379 // neither blocked nor white-listed, which means that it's allowed 401 // neither blocked nor white-listed, which means that it's allowed
380 // by default and can still be blocked if it's non-sandboxed. 402 // by default and can still be blocked if it's non-sandboxed.
381 // 403 //
382 IPC_SYNC_MESSAGE_CONTROL2_1(ChromeViewHostMsg_GetPluginContentSetting, 404 IPC_SYNC_MESSAGE_CONTROL2_1(ChromeViewHostMsg_GetPluginContentSetting,
383 GURL /* policy_url */, 405 GURL /* policy_url */,
384 std::string /* resource */, 406 std::string /* resource */,
385 ContentSetting /* setting */) 407 ContentSetting /* setting */)
386 408
409 // Return information about a plugin for the given URL and MIME type.
410 // In contrast to ViewHostMsg_GetPluginInfo in content/, this IPC call knows
411 // about specific reasons why a plug-in can't be used, for example because it's
412 // disabled.
413 IPC_SYNC_MESSAGE_CONTROL4_3(ChromeViewHostMsg_GetPluginInfo,
414 int /* render_view_id */,
415 GURL /* url */,
416 GURL /* top origin url */,
417 std::string /* mime_type */,
418 ChromeViewHostMsg_GetPluginInfo_Status /* status */,
419 webkit::WebPluginInfo /* plugin */,
420 std::string /* actual_mime_type */)
421
387 // Specifies the URL as the first parameter (a wstring) and thumbnail as 422 // Specifies the URL as the first parameter (a wstring) and thumbnail as
388 // binary data as the second parameter. 423 // binary data as the second parameter.
389 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_Thumbnail, 424 IPC_MESSAGE_ROUTED3(ChromeViewHostMsg_Thumbnail,
390 GURL /* url */, 425 GURL /* url */,
391 ThumbnailScore /* score */, 426 ThumbnailScore /* score */,
392 SkBitmap /* bitmap */) 427 SkBitmap /* bitmap */)
393 428
394 // Send a snapshot of the tab contents to the render host. 429 // Send a snapshot of the tab contents to the render host.
395 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot, 430 IPC_MESSAGE_ROUTED1(ChromeViewHostMsg_Snapshot,
396 SkBitmap /* bitmap */) 431 SkBitmap /* bitmap */)
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 // previous SetCookie message to be processed. 596 // previous SetCookie message to be processed.
562 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies, 597 IPC_SYNC_MESSAGE_ROUTED2_1(ChromeViewHostMsg_GetCookies,
563 GURL /* url */, 598 GURL /* url */,
564 GURL /* first_party_for_cookies */, 599 GURL /* first_party_for_cookies */,
565 std::string /* cookies */) 600 std::string /* cookies */)
566 601
567 // Provide the browser process with current renderer framerate. 602 // Provide the browser process with current renderer framerate.
568 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS, 603 IPC_MESSAGE_CONTROL2(ChromeViewHostMsg_FPS,
569 int /* routing id */, 604 int /* routing id */,
570 float /* frames per second */) 605 float /* frames per second */)
OLDNEW
« no previous file with comments | « chrome/common/default_plugin.cc ('k') | chrome/renderer/blocked_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698