Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 59791b51e94f69bfbe162b375242ea576cb65ebc..f792db7257ddde432652b9c32b7174781ecb4d69 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2048,6 +2048,18 @@ void WebContentsImpl::Cut() { |
RecordAction(base::UserMetricsAction("Cut")); |
} |
+void WebContentsImpl::Print() { |
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
+ SetHistoryContext(controller_.GetLastCommittedEntry(), 3)); |
+ printf("\nPrint\n"); |
+} |
+ |
+void WebContentsImpl::SaveImage() { |
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
+ SetHistoryContext(controller_.GetLastCommittedEntry(), 2)); |
+ printf("\nSave Image\n"); |
+} |
+ |
void WebContentsImpl::Copy() { |
RenderFrameHost* focused_frame = GetFocusedFrame(); |
if (!focused_frame) |
@@ -2055,6 +2067,9 @@ void WebContentsImpl::Copy() { |
focused_frame->Send(new InputMsg_Copy(focused_frame->GetRoutingID())); |
RecordAction(base::UserMetricsAction("Copy")); |
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
+ SetHistoryContext(controller_.GetLastCommittedEntry(), 1)); |
+ printf("\nCopy\n"); |
} |
void WebContentsImpl::CopyToFindPboard() { |
@@ -3147,6 +3162,9 @@ void WebContentsImpl::OnMediaPlayingNotification(int64 player_cookie, |
} |
FOR_EACH_OBSERVER(WebContentsObserver, observers_, MediaStartedPlaying()); |
+ printf("\nPlaying media\n"); |
+ FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
+ SetHistoryContext(controller_.GetLastCommittedEntry(), 4)); |
} |
void WebContentsImpl::OnMediaPausedNotification(int64 player_cookie) { |