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

Unified Diff: chrome/renderer/render_view.cc

Issue 164458: Land http://codereview.chromium.org/159067: (Closed)
Patch Set: undo docs Created 11 years, 4 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/renderer/render_view.h ('k') | chrome/renderer/renderer_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 1ddf4cc0c59f3f7819562e88b723ecad28a77837..9fd1f1d92352e4a8ddf95d7f36cabd72631daf66 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -19,6 +19,7 @@
#include "base/gfx/png_encoder.h"
#include "base/gfx/native_widget_types.h"
#include "base/process_util.h"
+#include "base/singleton.h"
#include "base/string_piece.h"
#include "base/string_util.h"
#include "build/build_config.h"
@@ -201,10 +202,14 @@ RenderView::RenderView(RenderThreadBase* render_thread)
preferred_width_(0),
send_preferred_width_changes_(false),
determine_page_text_after_loading_stops_(false),
+ view_type_(ViewType::INVALID),
+ browser_window_id_(-1),
last_top_level_navigation_page_id_(-1) {
+ Singleton<RenderViewSet>()->render_view_set_.insert(this);
}
RenderView::~RenderView() {
+ Singleton<RenderViewSet>()->render_view_set_.erase(this);
if (decrement_shared_popup_at_destruction_)
shared_popup_counter_->data--;
@@ -427,6 +432,10 @@ void RenderView::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ViewMsg_EnableIntrinsicWidthChangedMode,
OnEnableIntrinsicWidthChangedMode)
IPC_MESSAGE_HANDLER(ViewMsg_SetRendererPrefs, OnSetRendererPrefs)
+ IPC_MESSAGE_HANDLER(ViewMsg_UpdateBrowserWindowId,
+ OnUpdateBrowserWindowId)
+ IPC_MESSAGE_HANDLER(ViewMsg_NotifyRenderViewType,
+ OnNotifyRendererViewType)
IPC_MESSAGE_HANDLER(ViewMsg_MediaPlayerActionAt, OnMediaPlayerActionAt)
IPC_MESSAGE_HANDLER(ViewMsg_SetActive, OnSetActive)
@@ -2777,6 +2786,14 @@ void RenderView::OnMediaPlayerActionAt(int x,
webview()->MediaPlayerActionAt(x, y, action);
}
+void RenderView::OnNotifyRendererViewType(ViewType::Type type) {
+ view_type_ = type;
+}
+
+void RenderView::OnUpdateBrowserWindowId(int window_id) {
+ browser_window_id_ = window_id;
+}
+
void RenderView::OnUpdateBackForwardListCount(int back_list_count,
int forward_list_count) {
history_back_list_count_ = back_list_count;
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/renderer/renderer_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698