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

Side by Side Diff: chrome/browser/ui/views/location_bar/action_box_button_view.cc

Issue 12095023: Allow platform apps to add themselves to the Action Box. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use raw pointer + IconImage signature changed Created 7 years, 10 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/ui/views/action_box_menu.cc ('k') | chrome/chrome_browser_extensions.gypi » ('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) 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/location_bar/action_box_button_view.h" 5 #include "chrome/browser/ui/views/location_bar/action_box_button_view.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/toolbar/action_box_menu_model.h" 9 #include "chrome/browser/ui/toolbar/action_box_menu_model.h"
10 #include "chrome/browser/ui/view_ids.h" 10 #include "chrome/browser/ui/view_ids.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return true; 56 return true;
57 } 57 }
58 58
59 void ActionBoxButtonView::GetHitTestMask(gfx::Path* mask) const { 59 void ActionBoxButtonView::GetHitTestMask(gfx::Path* mask) const {
60 SkRect clickable_rect; 60 SkRect clickable_rect;
61 clickable_rect.iset(0, kBorderOverlap, width(), height() - kBorderOverlap); 61 clickable_rect.iset(0, kBorderOverlap, width(), height() - kBorderOverlap);
62 mask->addRect(clickable_rect); 62 mask->addRect(clickable_rect);
63 } 63 }
64 64
65 void ActionBoxButtonView::ShowMenu(scoped_ptr<ActionBoxMenuModel> menu_model) { 65 void ActionBoxButtonView::ShowMenu(scoped_ptr<ActionBoxMenuModel> menu_model) {
66 menu_ = ActionBoxMenu::Create(browser_, menu_model.Pass()); 66 menu_ = ActionBoxMenu::Create(browser_->profile(), menu_model.Pass());
67 menu_->RunMenu(this, menu_offset_); 67 menu_->RunMenu(this, menu_offset_);
68 } 68 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/action_box_menu.cc ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698