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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_prompt_view.cc

Issue 13142003: Fix app list position in windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/ui/views/bookmarks/bookmark_prompt_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_prompt_view.h"
6 6
7 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h" 7 #include "chrome/browser/ui/bookmarks/bookmark_prompt_controller.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 21 matching lines...) Expand all
32 bookmark_bubble_ = new BookmarkPromptView(anchor_view, prefs); 32 bookmark_bubble_ = new BookmarkPromptView(anchor_view, prefs);
33 views::BubbleDelegateView::CreateBubble(bookmark_bubble_)->Show(); 33 views::BubbleDelegateView::CreateBubble(bookmark_bubble_)->Show();
34 } 34 }
35 35
36 BookmarkPromptView::BookmarkPromptView(views::View* anchor_view, 36 BookmarkPromptView::BookmarkPromptView(views::View* anchor_view,
37 PrefService* prefs) 37 PrefService* prefs)
38 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 38 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
39 dismiss_link_(NULL), 39 dismiss_link_(NULL),
40 prefs_(prefs) { 40 prefs_(prefs) {
41 // Compensate for built-in vertical padding in the anchor view's image. 41 // Compensate for built-in vertical padding in the anchor view's image.
42 set_anchor_insets(gfx::Insets(5, 0, 5, 0)); 42 set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));
43 } 43 }
44 44
45 BookmarkPromptView::~BookmarkPromptView() { 45 BookmarkPromptView::~BookmarkPromptView() {
46 DCHECK_NE(this, bookmark_bubble_); 46 DCHECK_NE(this, bookmark_bubble_);
47 } 47 }
48 48
49 void BookmarkPromptView::Init() { 49 void BookmarkPromptView::Init() {
50 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 50 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical,
51 kHorizontalPadding, 0, 0)); 51 kHorizontalPadding, 0, 0));
52 52
(...skipping 14 matching lines...) Expand all
67 void BookmarkPromptView::LinkClicked(views::Link* source, int event_flags) { 67 void BookmarkPromptView::LinkClicked(views::Link* source, int event_flags) {
68 DCHECK_EQ(source, dismiss_link_); 68 DCHECK_EQ(source, dismiss_link_);
69 BookmarkPromptController::DisableBookmarkPrompt(prefs_); 69 BookmarkPromptController::DisableBookmarkPrompt(prefs_);
70 StartFade(false); 70 StartFade(false);
71 } 71 }
72 72
73 void BookmarkPromptView::WindowClosing() { 73 void BookmarkPromptView::WindowClosing() {
74 bookmark_bubble_ = NULL; 74 bookmark_bubble_ = NULL;
75 BookmarkPromptController::ClosingBookmarkPrompt(); 75 BookmarkPromptController::ClosingBookmarkPrompt();
76 } 76 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc ('k') | chrome/browser/ui/views/chrome_to_mobile_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698