summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 00:11:00 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-23 00:11:00 +0000
commit4e6239c7292df55796511a57407a542741077daf (patch)
treeaf4eb38e36e66ca2ed47961bcf18a22f9cb3c404
parent02065c61d8f4b019bc0addb5b53db8426e0e5ce5 (diff)
downloadchromium_src-4e6239c7292df55796511a57407a542741077daf.zip
chromium_src-4e6239c7292df55796511a57407a542741077daf.tar.gz
chromium_src-4e6239c7292df55796511a57407a542741077daf.tar.bz2
Removed sending of the following IPC messages from chrome and added API's on the RenderViewHost
object to facilitate this. 1. ViewMsg_CustomContextMenuAction 2. ViewMsg_ContextMenuClosed 3. ViewMsg_CopyImageAt 4. ViewMsg_MediaPlayerActionAt 5. ViewMsg_DisassociateFromPopupCount 6. ViewMsg_MoveOrResizeStarted 7. ViewMsg_StopFinding The ViewMsg_FindReplyACK message is now sent by the TabContents::OnFindReply handler. Continuing changes to get rid of the pattern of IPC messages being sent and processed across content and chrome. BUG=87335. TEST=no change in functionality. Review URL: http://codereview.chromium.org/8002005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102404 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc16
-rw-r--r--chrome/browser/ui/browser.cc5
-rw-r--r--chrome/browser/ui/find_bar/find_tab_helper.cc13
-rw-r--r--chrome/browser/ui/gtk/browser_window_gtk.cc4
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--content/browser/renderer_host/render_view_host.cc31
-rw-r--r--content/browser/renderer_host/render_view_host.h37
-rw-r--r--content/browser/tab_contents/tab_contents.cc8
-rw-r--r--content/common/view_message_enums.h154
-rw-r--r--content/common/view_messages.h153
-rw-r--r--content/content_common.gypi1
11 files changed, 240 insertions, 186 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 06f3155..31bb05b 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -62,9 +62,9 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
#include "content/common/content_restriction.h"
-#include "content/common/view_messages.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
+#include "net/base/net_util.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerAction.h"
#include "ui/base/l10n/l10n_util.h"
@@ -1427,8 +1427,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
if (id >= IDC_CONTENT_CONTEXT_CUSTOM_FIRST &&
id <= IDC_CONTENT_CONTEXT_CUSTOM_LAST) {
unsigned action = id - IDC_CONTENT_CONTEXT_CUSTOM_FIRST;
- rvh->Send(new ViewMsg_CustomContextMenuAction(
- rvh->routing_id(), params_.custom_context, action));
+ rvh->ExecuteCustomContextMenuCommand(action, params_.custom_context);
return;
}
@@ -1873,8 +1872,7 @@ void RenderViewContextMenu::MenuClosed(ui::SimpleMenuModel* source) {
view->ShowingContextMenu(false);
RenderViewHost* rvh = source_tab_contents_->render_view_host();
if (rvh) {
- rvh->Send(new ViewMsg_ContextMenuClosed(
- rvh->routing_id(), params_.custom_context));
+ rvh->NotifyContextMenuClosed(params_.custom_context);
}
}
@@ -1923,8 +1921,7 @@ void RenderViewContextMenu::OpenURL(
}
void RenderViewContextMenu::CopyImageAt(int x, int y) {
- RenderViewHost* rvh = source_tab_contents_->render_view_host();
- rvh->Send(new ViewMsg_CopyImageAt(rvh->routing_id(), x, y));
+ source_tab_contents_->render_view_host()->CopyImageAt(x, y);
}
void RenderViewContextMenu::Inspect(int x, int y) {
@@ -1943,7 +1940,6 @@ void RenderViewContextMenu::WriteURLToClipboard(const GURL& url) {
void RenderViewContextMenu::MediaPlayerActionAt(
const gfx::Point& location,
const WebMediaPlayerAction& action) {
- RenderViewHost* rvh = source_tab_contents_->render_view_host();
- rvh->Send(new ViewMsg_MediaPlayerActionAt(
- rvh->routing_id(), location, action));
+ source_tab_contents_->render_view_host()->
+ ExecuteMediaPlayerActionAtLocation(location, action);
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 639ba74..321fce1 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -18,6 +18,7 @@
#include "base/metrics/histogram.h"
#include "base/path_service.h"
#include "base/string_number_conversions.h"
+#include "base/stringprintf.h"
#include "base/string_util.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
@@ -143,7 +144,6 @@
#include "content/common/notification_service.h"
#include "content/common/page_transition_types.h"
#include "content/common/page_zoom.h"
-#include "content/common/view_messages.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -3389,8 +3389,7 @@ void Browser::AddNewContents(TabContents* source,
return;
}
- RenderViewHost* view = new_contents->render_view_host();
- view->Send(new ViewMsg_DisassociateFromPopupCount(view->routing_id()));
+ new_contents->render_view_host()->DisassociateFromPopupCount();
}
browser::NavigateParams params(this, new_wrapper);
diff --git a/chrome/browser/ui/find_bar/find_tab_helper.cc b/chrome/browser/ui/find_bar/find_tab_helper.cc
index c7f191c..d2eba07 100644
--- a/chrome/browser/ui/find_bar/find_tab_helper.cc
+++ b/chrome/browser/ui/find_bar/find_tab_helper.cc
@@ -12,7 +12,7 @@
#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/common/notification_service.h"
-#include "content/common/view_messages.h"
+#include "content/common/view_message_enums.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
using WebKit::WebFindOptions;
@@ -119,8 +119,7 @@ void FindTabHelper::StopFinding(
NOTREACHED();
params.action = ViewMsg_StopFinding_Params::kKeepSelection;
}
- tab_contents()->render_view_host()->Send(new ViewMsg_StopFinding(
- tab_contents()->render_view_host()->routing_id(), params));
+ tab_contents()->render_view_host()->StopFinding(params);
}
void FindTabHelper::HandleFindReply(int request_id,
@@ -152,12 +151,4 @@ void FindTabHelper::HandleFindReply(int request_id,
Source<TabContents>(tab_contents()),
Details<FindNotificationDetails>(&last_search_result_));
}
-
- // Send a notification to the renderer that we are ready to receive more
- // results from the scoping effort of the Find operation. The FindInPage
- // scoping is asynchronous and periodically sends results back up to the
- // browser using IPC. In an effort to not spam the browser we have the
- // browser send an ACK for each FindReply message and have the renderer
- // queue up the latest status message while waiting for this ACK.
- Send(new ViewMsg_FindReplyACK(routing_id()));
}
diff --git a/chrome/browser/ui/gtk/browser_window_gtk.cc b/chrome/browser/ui/gtk/browser_window_gtk.cc
index 7ab1b0b..3a676ff 100644
--- a/chrome/browser/ui/gtk/browser_window_gtk.cc
+++ b/chrome/browser/ui/gtk/browser_window_gtk.cc
@@ -84,7 +84,6 @@
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/common/native_web_keyboard_event.h"
#include "content/common/notification_service.h"
-#include "content/common/view_messages.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -1395,8 +1394,7 @@ gboolean BrowserWindowGtk::OnConfigure(GtkWidget* widget,
TabContentsWrapper* tab = GetDisplayedTab();
if (tab) {
- RenderViewHost* rvh = tab->tab_contents()->render_view_host();
- rvh->Send(new ViewMsg_MoveOrResizeStarted(rvh->routing_id()));
+ tab->tab_contents()->render_view_host()->NotifyMoveOrResizeStarted();
}
if (bounds_.size() != bounds.size())
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index c952ef1..511422d 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -83,7 +83,6 @@
#include "content/browser/user_metrics.h"
#include "content/common/content_switches.h"
#include "content/common/notification_service.h"
-#include "content/common/view_messages.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -1730,8 +1729,7 @@ void BrowserView::OnWindowBeginUserBoundsChange() {
TabContents* tab_contents = GetSelectedTabContents();
if (!tab_contents)
return;
- RenderViewHost* rvh = tab_contents->render_view_host();
- rvh->Send(new ViewMsg_MoveOrResizeStarted(rvh->routing_id()));
+ tab_contents->render_view_host()->NotifyMoveOrResizeStarted();
}
void BrowserView::OnWidgetMove() {
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc
index 2654aa2..6c8dc7b 100644
--- a/content/browser/renderer_host/render_view_host.cc
+++ b/content/browser/renderer_host/render_view_host.cc
@@ -1264,6 +1264,37 @@ void RenderViewHost::EnablePreferredSizeMode(int flags) {
Send(new ViewMsg_EnablePreferredSizeChangedMode(routing_id(), flags));
}
+void RenderViewHost::ExecuteCustomContextMenuCommand(
+ int action, const webkit_glue::CustomContextMenuContext& context) {
+ Send(new ViewMsg_CustomContextMenuAction(routing_id(), context, action));
+}
+
+void RenderViewHost::NotifyContextMenuClosed(
+ const webkit_glue::CustomContextMenuContext& context) {
+ Send(new ViewMsg_ContextMenuClosed(routing_id(), context));
+}
+
+void RenderViewHost::CopyImageAt(int x, int y) {
+ Send(new ViewMsg_CopyImageAt(routing_id(), x, y));
+}
+
+void RenderViewHost::ExecuteMediaPlayerActionAtLocation(
+ const gfx::Point& location, const WebKit::WebMediaPlayerAction& action) {
+ Send(new ViewMsg_MediaPlayerActionAt(routing_id(), location, action));
+}
+
+void RenderViewHost::DisassociateFromPopupCount() {
+ Send(new ViewMsg_DisassociateFromPopupCount(routing_id()));
+}
+
+void RenderViewHost::NotifyMoveOrResizeStarted() {
+ Send(new ViewMsg_MoveOrResizeStarted(routing_id()));
+}
+
+void RenderViewHost::StopFinding(const ViewMsg_StopFinding_Params& params) {
+ Send(new ViewMsg_StopFinding(routing_id(), params));
+}
+
void RenderViewHost::OnAccessibilityNotifications(
const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) {
if (view() && !is_swapped_out_)
diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h
index 29fa004..582c918 100644
--- a/content/browser/renderer_host/render_view_host.h
+++ b/content/browser/renderer_host/render_view_host.h
@@ -43,6 +43,7 @@ struct ViewMsg_Navigate_Params;
struct WebDropData;
struct UserMetricsAction;
struct ViewHostMsg_RunFileChooser_Params;
+struct ViewMsg_StopFinding_Params;
namespace base {
class ListValue;
@@ -58,6 +59,7 @@ class Range;
namespace webkit_glue {
struct WebAccessibility;
+struct CustomContextMenuContext;
} // namespace webkit_glue
namespace WebKit {
@@ -322,10 +324,6 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
sudden_termination_allowed_ = enabled;
}
- // Message the renderer that we should be counted as a new document and not
- // as a popup.
- void DisassociateFromPopupCount();
-
// RenderWidgetHost public overrides.
virtual void Shutdown();
virtual bool IsRenderView() const;
@@ -411,6 +409,37 @@ class CONTENT_EXPORT RenderViewHost : public RenderWidgetHost {
// Instructs the RenderView to send back updates to the preferred size.
void EnablePreferredSizeMode(int flags);
+ // Executes custom context menu action that was provided from WebKit.
+ void ExecuteCustomContextMenuCommand(
+ int action, const webkit_glue::CustomContextMenuContext& context);
+
+ // Let the renderer know that the menu has been closed.
+ void NotifyContextMenuClosed(
+ const webkit_glue::CustomContextMenuContext& context);
+
+ // Copies the image at location x, y to the clipboard (if there indeed is an
+ // image at that location).
+ void CopyImageAt(int x, int y);
+
+ // Tells the renderer to perform the given action on the media player
+ // located at the given point.
+ void ExecuteMediaPlayerActionAtLocation(
+ const gfx::Point& location, const WebKit::WebMediaPlayerAction& action);
+
+ // Sent to the renderer when a popup window should no longer count against
+ // the current popup count (either because it's not a popup or because it was
+ // a generated by a user action or because a constrained popup got turned
+ // into a full window).
+ void DisassociateFromPopupCount();
+
+ // Notification that a move or resize renderer's containing window has
+ // started.
+ void NotifyMoveOrResizeStarted();
+
+ // Notifies the renderer that the user has closed the FindInPage window
+ // (and what action to take regarding the selection).
+ void StopFinding(const ViewMsg_StopFinding_Params& params);
+
// NOTE: Do not add functions that just send an IPC message that are called in
// one or two places. Have the caller send the IPC message directly.
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 287e661..73bbe5b 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1150,6 +1150,14 @@ void TabContents::OnFindReply(int request_id,
bool final_update) {
delegate()->FindReply(this, request_id, number_of_matches, selection_rect,
active_match_ordinal, final_update);
+ // Send a notification to the renderer that we are ready to receive more
+ // results from the scoping effort of the Find operation. The FindInPage
+ // scoping is asynchronous and periodically sends results back up to the
+ // browser using IPC. In an effort to not spam the browser we have the
+ // browser send an ACK for each FindReply message and have the renderer
+ // queue up the latest status message while waiting for this ACK.
+ render_view_host()->Send(
+ new ViewMsg_FindReplyACK(render_view_host()->routing_id()));
}
void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
diff --git a/content/common/view_message_enums.h b/content/common/view_message_enums.h
new file mode 100644
index 0000000..f1538c8
--- /dev/null
+++ b/content/common/view_message_enums.h
@@ -0,0 +1,154 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_
+#define CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_
+
+struct ViewHostMsg_AccEvent {
+ enum Value {
+ // The active descendant of a node has changed.
+ ACTIVE_DESCENDANT_CHANGED,
+
+ // An alert appeared.
+ ALERT,
+
+ // The node checked state has changed.
+ CHECK_STATE_CHANGED,
+
+ // The node tree structure has changed.
+ CHILDREN_CHANGED,
+
+ // The node in focus has changed.
+ FOCUS_CHANGED,
+
+ // Page layout has completed.
+ LAYOUT_COMPLETE,
+
+ // Content within a part of the page marked as a live region changed.
+ LIVE_REGION_CHANGED,
+
+ // The document node has loaded.
+ LOAD_COMPLETE,
+
+ // A menu list value changed.
+ MENU_LIST_VALUE_CHANGED,
+
+ // An object was shown.
+ OBJECT_SHOW,
+
+ // An object was hidden.
+ OBJECT_HIDE,
+
+ // The number of rows in a grid or tree control changed.
+ ROW_COUNT_CHANGED,
+
+ // A row in a grid or tree control was collapsed.
+ ROW_COLLAPSED,
+
+ // A row in a grid or tree control was expanded.
+ ROW_EXPANDED,
+
+ // The document was scrolled to an anchor node.
+ SCROLLED_TO_ANCHOR,
+
+ // One or more selected children of this node have changed.
+ SELECTED_CHILDREN_CHANGED,
+
+ // The text cursor or selection changed.
+ SELECTED_TEXT_CHANGED,
+
+ // Text was inserted in a node with text content.
+ TEXT_INSERTED,
+
+ // Text was removed in a node with text content.
+ TEXT_REMOVED,
+
+ // The node value has changed.
+ VALUE_CHANGED,
+ };
+};
+
+// Values that may be OR'd together to form the 'flags' parameter of the
+// ViewMsg_EnablePreferredSizeChangedMode message.
+enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags {
+ kPreferredSizeNothing,
+ kPreferredSizeWidth = 1 << 0,
+ // Requesting the height currently requires a polling loop in render_view.cc.
+ kPreferredSizeHeightThisIsSlow = 1 << 1,
+};
+
+struct ViewHostMsg_RunFileChooser_Mode {
+ public:
+ enum Value {
+ // Requires that the file exists before allowing the user to pick it.
+ Open,
+
+ // Like Open, but allows picking multiple files to open.
+ OpenMultiple,
+
+ // Like Open, but selects a folder.
+ OpenFolder,
+
+ // Allows picking a nonexistent file, and prompts to overwrite if the file
+ // already exists.
+ Save,
+ };
+};
+
+// Values that may be OR'd together to form the 'flags' parameter of a
+// ViewHostMsg_UpdateRect_Params structure.
+struct ViewHostMsg_UpdateRect_Flags {
+ enum {
+ IS_RESIZE_ACK = 1 << 0,
+ IS_RESTORE_ACK = 1 << 1,
+ IS_REPAINT_ACK = 1 << 2,
+ };
+ static bool is_resize_ack(int flags) {
+ return (flags & IS_RESIZE_ACK) != 0;
+ }
+ static bool is_restore_ack(int flags) {
+ return (flags & IS_RESTORE_ACK) != 0;
+ }
+ static bool is_repaint_ack(int flags) {
+ return (flags & IS_REPAINT_ACK) != 0;
+ }
+};
+
+struct ViewMsg_Navigate_Type {
+ public:
+ enum Value {
+ // Reload the page.
+ RELOAD,
+
+ // Reload the page, ignoring any cache entries.
+ RELOAD_IGNORING_CACHE,
+
+ // The navigation is the result of session restore and should honor the
+ // page's cache policy while restoring form state. This is set to true if
+ // restoring a tab/session from the previous session and the previous
+ // session did not crash. If this is not set and the page was restored then
+ // the page's cache policy is ignored and we load from the cache.
+ RESTORE,
+
+ // Navigation type not categorized by the other types.
+ NORMAL
+ };
+};
+
+// 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
+ };
+
+ ViewMsg_StopFinding_Params() : action(kClearSelection) {}
+
+ // The action that should be taken when the find is completed.
+ Action action;
+};
+
+#endif // CONTENT_COMMON_VIEW_MESSAGES_ENUMS_H_
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index f80be55..ea9b902 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -15,6 +15,7 @@
#include "content/common/page_transition_types.h"
#include "content/common/page_zoom.h"
#include "content/common/renderer_preferences.h"
+#include "content/common/view_message_enums.h"
#include "content/common/webkit_param_traits.h"
#include "content/common/window_container_type.h"
#include "ipc/ipc_channel_handle.h"
@@ -44,158 +45,6 @@
#include "content/common/mac/font_descriptor.h"
#endif
-// Define enums used in this file inside an include-guard.
-#ifndef CONTENT_COMMON_VIEW_MESSAGES_H_
-#define CONTENT_COMMON_VIEW_MESSAGES_H_
-
-struct ViewHostMsg_AccEvent {
- enum Value {
- // The active descendant of a node has changed.
- ACTIVE_DESCENDANT_CHANGED,
-
- // An alert appeared.
- ALERT,
-
- // The node checked state has changed.
- CHECK_STATE_CHANGED,
-
- // The node tree structure has changed.
- CHILDREN_CHANGED,
-
- // The node in focus has changed.
- FOCUS_CHANGED,
-
- // Page layout has completed.
- LAYOUT_COMPLETE,
-
- // Content within a part of the page marked as a live region changed.
- LIVE_REGION_CHANGED,
-
- // The document node has loaded.
- LOAD_COMPLETE,
-
- // A menu list value changed.
- MENU_LIST_VALUE_CHANGED,
-
- // An object was shown.
- OBJECT_SHOW,
-
- // An object was hidden.
- OBJECT_HIDE,
-
- // The number of rows in a grid or tree control changed.
- ROW_COUNT_CHANGED,
-
- // A row in a grid or tree control was collapsed.
- ROW_COLLAPSED,
-
- // A row in a grid or tree control was expanded.
- ROW_EXPANDED,
-
- // The document was scrolled to an anchor node.
- SCROLLED_TO_ANCHOR,
-
- // One or more selected children of this node have changed.
- SELECTED_CHILDREN_CHANGED,
-
- // The text cursor or selection changed.
- SELECTED_TEXT_CHANGED,
-
- // Text was inserted in a node with text content.
- TEXT_INSERTED,
-
- // Text was removed in a node with text content.
- TEXT_REMOVED,
-
- // The node value has changed.
- VALUE_CHANGED,
- };
-};
-
-// Values that may be OR'd together to form the 'flags' parameter of the
-// ViewMsg_EnablePreferredSizeChangedMode message.
-enum ViewHostMsg_EnablePreferredSizeChangedMode_Flags {
- kPreferredSizeNothing,
- kPreferredSizeWidth = 1 << 0,
- // Requesting the height currently requires a polling loop in render_view.cc.
- kPreferredSizeHeightThisIsSlow = 1 << 1,
-};
-
-struct ViewHostMsg_RunFileChooser_Mode {
- public:
- enum Value {
- // Requires that the file exists before allowing the user to pick it.
- Open,
-
- // Like Open, but allows picking multiple files to open.
- OpenMultiple,
-
- // Like Open, but selects a folder.
- OpenFolder,
-
- // Allows picking a nonexistent file, and prompts to overwrite if the file
- // already exists.
- Save,
- };
-};
-
-// Values that may be OR'd together to form the 'flags' parameter of a
-// ViewHostMsg_UpdateRect_Params structure.
-struct ViewHostMsg_UpdateRect_Flags {
- enum {
- IS_RESIZE_ACK = 1 << 0,
- IS_RESTORE_ACK = 1 << 1,
- IS_REPAINT_ACK = 1 << 2,
- };
- static bool is_resize_ack(int flags) {
- return (flags & IS_RESIZE_ACK) != 0;
- }
- static bool is_restore_ack(int flags) {
- return (flags & IS_RESTORE_ACK) != 0;
- }
- static bool is_repaint_ack(int flags) {
- return (flags & IS_REPAINT_ACK) != 0;
- }
-};
-
-struct ViewMsg_Navigate_Type {
- public:
- enum Value {
- // Reload the page.
- RELOAD,
-
- // Reload the page, ignoring any cache entries.
- RELOAD_IGNORING_CACHE,
-
- // The navigation is the result of session restore and should honor the
- // page's cache policy while restoring form state. This is set to true if
- // restoring a tab/session from the previous session and the previous
- // session did not crash. If this is not set and the page was restored then
- // the page's cache policy is ignored and we load from the cache.
- RESTORE,
-
- // Navigation type not categorized by the other types.
- NORMAL
- };
-};
-
-// 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
- };
-
- ViewMsg_StopFinding_Params() : action(kClearSelection) {}
-
- // The action that should be taken when the find is completed.
- Action action;
-};
-
-#endif // CONTENT_COMMON_VIEW_MESSAGES_H_
-
#undef IPC_MESSAGE_EXPORT
#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
diff --git a/content/content_common.gypi b/content/content_common.gypi
index 98e9971..2d6da5f 100644
--- a/content/content_common.gypi
+++ b/content/content_common.gypi
@@ -248,6 +248,7 @@
'common/url_constants.h',
'common/utility_messages.h',
'common/view_messages.h',
+ 'common/view_message_enums.h',
'common/view_types.cc',
'common/view_types.h',
'common/web_database_observer_impl.cc',