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

Side by Side Diff: ui/views/controls/label.h

Issue 2164483006: [MacViews] Implemented text context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 3 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 | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/controls/label.cc » ('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 #ifndef UI_VIEWS_CONTROLS_LABEL_H_ 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_
6 #define UI_VIEWS_CONTROLS_LABEL_H_ 6 #define UI_VIEWS_CONTROLS_LABEL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 FRIEND_TEST_ALL_PREFIXES(LabelTest, FocusBounds); 230 FRIEND_TEST_ALL_PREFIXES(LabelTest, FocusBounds);
231 FRIEND_TEST_ALL_PREFIXES(LabelTest, MultiLineSizingWithElide); 231 FRIEND_TEST_ALL_PREFIXES(LabelTest, MultiLineSizingWithElide);
232 friend class LabelSelectionTest; 232 friend class LabelSelectionTest;
233 233
234 // ContextMenuController overrides: 234 // ContextMenuController overrides:
235 void ShowContextMenuForView(View* source, 235 void ShowContextMenuForView(View* source,
236 const gfx::Point& point, 236 const gfx::Point& point,
237 ui::MenuSourceType source_type) override; 237 ui::MenuSourceType source_type) override;
238 238
239 // WordLookupClient overrides: 239 // WordLookupClient overrides:
240 bool GetDecoratedWordAtPoint(const gfx::Point& point, 240 bool GetDecoratedWordAndBaselineAtPoint(const gfx::Point& point,
241 gfx::DecoratedText* decorated_word, 241 gfx::DecoratedText* decorated_word,
242 gfx::Point* baseline_point) override; 242 gfx::Point* baseline_point) override;
243 bool GetDecoratedTextAndBaselineFromSelection(
244 gfx::DecoratedText* decorated_text,
245 gfx::Point* baseline_point) override;
243 246
244 // SelectionControllerDelegate overrides: 247 // SelectionControllerDelegate overrides:
245 gfx::RenderText* GetRenderTextForSelectionController() override; 248 gfx::RenderText* GetRenderTextForSelectionController() override;
246 bool IsReadOnly() const override; 249 bool IsReadOnly() const override;
247 bool SupportsDrag() const override; 250 bool SupportsDrag() const override;
248 bool HasTextBeingDragged() const override; 251 bool HasTextBeingDragged() const override;
249 void SetTextBeingDragged(bool value) override; 252 void SetTextBeingDragged(bool value) override;
250 int GetViewHeight() const override; 253 int GetViewHeight() const override;
251 int GetViewWidth() const override; 254 int GetViewWidth() const override;
252 int GetDragSelectionDelay() const override; 255 int GetDragSelectionDelay() const override;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Context menu related members. 354 // Context menu related members.
352 ui::SimpleMenuModel context_menu_contents_; 355 ui::SimpleMenuModel context_menu_contents_;
353 std::unique_ptr<views::MenuRunner> context_menu_runner_; 356 std::unique_ptr<views::MenuRunner> context_menu_runner_;
354 357
355 DISALLOW_COPY_AND_ASSIGN(Label); 358 DISALLOW_COPY_AND_ASSIGN(Label);
356 }; 359 };
357 360
358 } // namespace views 361 } // namespace views
359 362
360 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 363 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « ui/views/cocoa/bridged_content_view.mm ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698