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

Side by Side Diff: chrome/browser/instant/instant_client.cc

Issue 11413217: Instant API: tell page whether the browser is capturing key strokes. (Closed) Base URL: http://git.chromium.org/chromium/src.git@focus
Patch Set: Fixed comments, mouse handling logic. Created 8 years 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "chrome/browser/instant/instant_client.h" 5 #include "chrome/browser/instant/instant_client.h"
6 6
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "content/public/browser/web_contents.h" 8 #include "content/public/browser/web_contents.h"
9 9
10 InstantClient::Delegate::~Delegate() { 10 InstantClient::Delegate::~Delegate() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 void InstantClient::SendThemeAreaHeight(int height) { 65 void InstantClient::SendThemeAreaHeight(int height) {
66 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height)); 66 Send(new ChromeViewMsg_SearchBoxThemeAreaHeightChanged(routing_id(), height));
67 } 67 }
68 68
69 void InstantClient::SetDisplayInstantResults(bool display_instant_results) { 69 void InstantClient::SetDisplayInstantResults(bool display_instant_results) {
70 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(routing_id(), 70 Send(new ChromeViewMsg_SearchBoxSetDisplayInstantResults(routing_id(),
71 display_instant_results)); 71 display_instant_results));
72 } 72 }
73 73
74 void InstantClient::KeyCaptureChanged(bool is_key_capture_enabled) {
75 Send(new ChromeViewMsg_SearchBoxKeyCaptureChanged(routing_id(),
76 is_key_capture_enabled));
77 }
78
74 void InstantClient::DidFinishLoad( 79 void InstantClient::DidFinishLoad(
75 int64 /* frame_id */, 80 int64 /* frame_id */,
76 const GURL& /* validated_url */, 81 const GURL& /* validated_url */,
77 bool is_main_frame, 82 bool is_main_frame,
78 content::RenderViewHost* /* render_view_host */) { 83 content::RenderViewHost* /* render_view_host */) {
79 if (is_main_frame) 84 if (is_main_frame)
80 DetermineIfPageSupportsInstant(); 85 DetermineIfPageSupportsInstant();
81 } 86 }
82 87
83 bool InstantClient::OnMessageReceived(const IPC::Message& message) { 88 bool InstantClient::OnMessageReceived(const IPC::Message& message) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 124
120 void InstantClient::StartCapturingKeyStrokes(int page_id) { 125 void InstantClient::StartCapturingKeyStrokes(int page_id) {
121 if (web_contents()->IsActiveEntry(page_id)) 126 if (web_contents()->IsActiveEntry(page_id))
122 delegate_->StartCapturingKeyStrokes(); 127 delegate_->StartCapturingKeyStrokes();
123 } 128 }
124 129
125 void InstantClient::StopCapturingKeyStrokes(int page_id) { 130 void InstantClient::StopCapturingKeyStrokes(int page_id) {
126 if (web_contents()->IsActiveEntry(page_id)) 131 if (web_contents()->IsActiveEntry(page_id))
127 delegate_->StopCapturingKeyStrokes(); 132 delegate_->StopCapturingKeyStrokes();
128 } 133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698