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

Side by Side Diff: chrome/renderer/searchbox.cc

Issue 6750018: Cleanup: Stop creating RenderViewObservers from chrome/ in RenderViewer. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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
OLDNEW
1 // Copyright (c) 2010 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 #include "chrome/renderer/searchbox.h" 5 #include "chrome/renderer/searchbox.h"
6 6
7 #include "chrome/common/render_messages.h" 7 #include "chrome/common/render_messages.h"
8 #include "chrome/renderer/searchbox_extension.h" 8 #include "chrome/renderer/searchbox_extension.h"
9 #include "content/renderer/render_view.h" 9 #include "content/renderer/render_view.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
11 11
12 using WebKit::WebView; 12 using WebKit::WebView;
13 13
14 RENDER_VIEW_OBSERVER_TRACKER_MAP(SearchBox);
15
14 SearchBox::SearchBox(RenderView* render_view) 16 SearchBox::SearchBox(RenderView* render_view)
15 : RenderViewObserver(render_view), 17 : RenderViewObserver(render_view),
18 RenderViewObserverTracker<SearchBox>(render_view),
16 verbatim_(false), 19 verbatim_(false),
17 selection_start_(0), 20 selection_start_(0),
18 selection_end_(0) { 21 selection_end_(0) {
19 } 22 }
20 23
21 SearchBox::~SearchBox() { 24 SearchBox::~SearchBox() {
22 } 25 }
23 26
24 void SearchBox::SetSuggestions(const std::vector<std::string>& suggestions, 27 void SearchBox::SetSuggestions(const std::vector<std::string>& suggestions,
25 InstantCompleteBehavior behavior) { 28 InstantCompleteBehavior behavior) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 int selection_end) { 91 int selection_end) {
89 value_ = value; 92 value_ = value;
90 verbatim_ = verbatim; 93 verbatim_ = verbatim;
91 selection_start_ = selection_start; 94 selection_start_ = selection_start;
92 selection_end_ = selection_end; 95 selection_end_ = selection_end;
93 bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant( 96 bool result = extensions_v8::SearchBoxExtension::PageSupportsInstant(
94 render_view()->webview()->mainFrame()); 97 render_view()->webview()->mainFrame());
95 render_view()->Send(new ViewHostMsg_InstantSupportDetermined( 98 render_view()->Send(new ViewHostMsg_InstantSupportDetermined(
96 render_view()->routing_id(), render_view()->page_id(), result)); 99 render_view()->routing_id(), render_view()->page_id(), result));
97 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698