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

Side by Side Diff: chrome/browser/tab_contents/match_preview.cc

Issue 3156016: Making window.focus()/blur() work only when user initiated (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Fix Linux compile Created 10 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/sidebar/sidebar_container.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/tab_contents/match_preview.h" 5 #include "chrome/browser/tab_contents/match_preview.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/tab_contents/navigation_controller.h" 10 #include "chrome/browser/tab_contents/navigation_controller.h"
(...skipping 19 matching lines...) Expand all
30 virtual void NavigationStateChanged(const TabContents* source, 30 virtual void NavigationStateChanged(const TabContents* source,
31 unsigned changed_flags) {} 31 unsigned changed_flags) {}
32 virtual void AddNewContents(TabContents* source, 32 virtual void AddNewContents(TabContents* source,
33 TabContents* new_contents, 33 TabContents* new_contents,
34 WindowOpenDisposition disposition, 34 WindowOpenDisposition disposition,
35 const gfx::Rect& initial_pos, 35 const gfx::Rect& initial_pos,
36 bool user_gesture) {} 36 bool user_gesture) {}
37 virtual void ActivateContents(TabContents* contents) { 37 virtual void ActivateContents(TabContents* contents) {
38 match_preview_->CommitCurrentPreview(); 38 match_preview_->CommitCurrentPreview();
39 } 39 }
40 virtual void DeactivateContents(TabContents* contents) {}
40 virtual void LoadingStateChanged(TabContents* source) {} 41 virtual void LoadingStateChanged(TabContents* source) {}
41 virtual void CloseContents(TabContents* source) {} 42 virtual void CloseContents(TabContents* source) {}
42 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {} 43 virtual void MoveContents(TabContents* source, const gfx::Rect& pos) {}
43 virtual void DetachContents(TabContents* source) {} 44 virtual void DetachContents(TabContents* source) {}
44 virtual bool IsPopup(const TabContents* source) const { 45 virtual bool IsPopup(const TabContents* source) const {
45 return false; 46 return false;
46 } 47 }
47 virtual TabContents* GetConstrainingContents(TabContents* source) { 48 virtual TabContents* GetConstrainingContents(TabContents* source) {
48 return NULL; 49 return NULL;
49 } 50 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void MatchPreview::CommitCurrentPreview() { 183 void MatchPreview::CommitCurrentPreview() {
183 DCHECK(preview_contents_.get()); 184 DCHECK(preview_contents_.get());
184 if (host_->delegate()) 185 if (host_->delegate())
185 host_->delegate()->CommitMatchPreview(host_); 186 host_->delegate()->CommitMatchPreview(host_);
186 } 187 }
187 188
188 TabContents* MatchPreview::ReleasePreviewContents() { 189 TabContents* MatchPreview::ReleasePreviewContents() {
189 url_ = GURL(); 190 url_ = GURL();
190 return preview_contents_.release(); 191 return preview_contents_.release();
191 } 192 }
OLDNEW
« no previous file with comments | « chrome/browser/sidebar/sidebar_container.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698